To upload a backup file to backup repository:
Go to Domains > domain name > Backup Manager (in the Files group) > Database Backup Repository and click Upload Backup File.
Select the database in which repository you want to upload the backup file to in the Database name menu.
Click Browse… and select the required backup file.
Leave the Restore database backup immediately upon uploading check box selected if you want the database contents to be restored immediately after the backup file is uploaded.
Click OK.
The database backup file will be uploaded to the backup repository of the specified database.
Resource : http://parallels.com/Plesk/
Downloading Backup Files from Plesk Server
To download a backup file from a backup repository within the control panel
Access the repository you need.
To access your own repository of backup files, go to Home > Backup Manager (in the Server group).
To access a repository of a reseller or client, go to Resellers > reseller’s name > Backup Manager (in the Files group) or Clients > client’s name > Backup Manager (in the Files group).
To access a repository related to a specific Web site, go to Domains > domain name > Backup Manager (in the Files group).
Click the icon corresponding to the backup file you wish to download.
Select the location where you wish to save the backup file and click Save.
The backup file will be downloaded from the backup repository.
Protect Server Files by Default
One aspect of Apache which is occasionally misunderstood is the feature of default access. That is, unless you take steps to change it, if the server can find its way to a file through normal URL mapping rules, it can serve it to clients.
For instance, consider the following example:
1. # cd /; ln -s / public_html
2. Accessing http://localhost/~root/
This would allow clients to walk through the entire filesystem. To work around this, add the following block to your server’s configuration:
Order Deny,Allow
Deny from all
Locate world-writable files and directories
To locate world-writable files and directories, you can use the following command
find / -path /proc -prune -o -perm -2 ! -type l -ls
World-writable files are a security risk since it allows anyone to modify them. Additionally, world-writable directories allow anyone to add or delete files.
The “! -type l” parameter skips all symbolic links since symbolic links are always world-writable. However, this is not a problem as long as the target of the link is not world-writable, which is checked by the above find command.
World-Writable directories with sticky bit such as the /tmp directory do not allow anyone except the owner of a file to delete or modify it in this directory. The sticky bit makes files stick to the user who created it and it prevents other users from deleting and renaming the files. Therefore, depending on the purpose of the directory world-writable directories with sticky are usually not an issue. An example is the /tmp directory:
~$ ls -ld /tmp
drwxrwxrwt 8 root root 4096 Oct 26 05:19 /tmp
From the find man pages:
-type c
File is of type c:
l symbolic link; this is never true if the -L option or the -follow option is in effect, unless the symbolic link is broken. If you want to search for symbolic links when -L is in effect, use -xtype.
How to replace words/strings in multiple files using sed.
sed - stream editor for filtering and transforming text
The streamline editor (sed) is very useful command for searching and replacing string/texts in multiple files.
Example 1
/var/named/# sed -i ’s/127.0.0.1/192.168.0.0.1/g’ *.com.db
Example 2
Attempt to match regexp against the pattern space. If successful, replace that portion matched with replacement. The replacement may contain the special char?acter & to refer to that portion of the pattern space which matched, and the special escapes \1 through \9 to refer to the corresponding matching sub-expres?sions in the regexp.
In the above command
sed -i is used to for editing.
s is used for subsituite the following text/word.
127.0.0.1 is the string to be replaced.
192.168.0.0.1 is what you would like replace with.
g is used for global search, looking for occurrence of text in all the lines in file.
To replace string 127.0.0.1 with 192.168.0.0.1 in multiple files using sed editor run sed like this :
$ sed -i ’s/127.0.0.1/92.168.0.0.1/g’ *.com.db
In Linux and UNIX sed command is available with default installation.
sed could show me only (say) lines 12-18 of a file and not show me the rest. This was very handy when I needed to review only part of a long file and I didn’t want to alter it.
# the ‘p’ stands for print
sed -n 12,18p myfile
Reference : http://sed.sourceforge.net