Making a backup

Regularly backing up data and configuration of a server, either Dedicated or Virtual, is an important issue in protecting you from incidents such as hardware/software failures, accidental deletion of data or cyber attacks.

The first thing to do before setting up anything is to determine if you want your backups to be manual or automated; besides that, you will need to determine where you are going to store them: on the server itself, on your own system or somewhere external.
The best option would be making automated backups to an external location and then also downloading them each time to your local system. In this way, you will always have safety copies handy, thus covering all kinds of eventualities.

For the convenience of saving backups to an external location, you may want to take advantage of the Backup Space service we are currently offering, available to purchase with new Dedicated and Virtual servers as well as separately from the Management page on your Control Panel of your already-purchased servers.

1

Log in to the Plesk administration panel, then enter the Backup Manager area.

2

Click on Personal FTP Repository Settings to set up an FTP repository to store your backups; this will allow you to use scheduling features.

3

On the next page enter the details of the FTP to link Plesk to.
If you are using a Backup Space (available to purchase with new servers as well as from the management page of your already-purchased server, in your Control Panel), enter in the fields on this page the Backup Space details as shown below:

4

After entering the details for the FTP archive, proceed to set the scheduling of your backup, clicking on Scheduled Backup Settings

5

Available ranges of time are: daily, weekly and monthly.
An important option you should activate is to backup the contents and configuration of the domain: this will allow restoration of a server complete configuration in case of disaster recovery, without having to reconfigure all servers' settings.

6

Now you are ready to start your backup: click on Back Up and let Plesk do the job.
Remember: the "File Server" option will save the backup on the server itself; you should tick "Personal FTP repository" to use the Backup Space you have previously set.

7

Once finished, your backup(s) will appear listed on the page of the Backup Manager from where we started.

Clicking on the name of the backup you will access a page showing the details of the backup and the option to restore what was saved earlier, as shown below.

8

If you already have a backup archive you want to save on your server, clicking on Upload Files to Server Repository will let you import it and then use it.

1

Install the lftp command using the package manager of your Linux distribution.
On Ubuntu / Debian, for example, use the command:

sudo apt-get install lftp
while on RedHat:
sudo yum install lftp

2

Create a simple script to synchronize one or more folders on your server using the username and password used at activation of your Backup Space and the host name which you will find in the Control Panel on the Account Details page. Use the text editor of your choice and use the following example:
lftp -u <username>,<yourpassword> <host>
mirror -R -v <source_folder> <target_folder>
quit

Replace source_folder with the folder where you want to create the backup. target_folder will be the one where you will find the backup once the operation is complete. You can enter multiple "mirror" commands to back up multiple folders at the same time.

3

Save the script with the name "backupMyServer", then run the backup using the command:
lftp -f backupMyServer

4

Once finished, you can make automatic backups (with hourly recurrence for example) using the Linux command:
crontab -e
and adding the line:
0 * * * * lftp -f <fullpath>/backupMyServer

5

Save the file by replacing fullpath with the path where you want the backupMyServer file to be saved within your file system.

1

To perform backups on Windows systems, please check two official tutorials from Microsoft for working with files on an FTP site or to link to a network drive; both procedures illustrate official Microsoft instructions.
With either method, the FTP server will appear on your desktop as a local drive on which you can copy and paste files.

2

If you want to connect your server to an ftp location to create "occasional" connections, use this method: Work with files on an FTP site.

3

If you want to instead use a network drive, use this method: Create a shortcut to (map) a network drive.

Procedures