Backing up and restoring your data
With the current version of backup and restore utilities installed with your control panel, you can:
Backup the entire server. You can do this only through the command line. The backup archive will include your control panel license key, mail server and DNS server settings, information on database servers, domain templates, virtual host skeletons, user accounts, domains, website's and their content, SSL certificates, databases, site applications, and custom buttons.
Backup individual user accounts with domains. The backup archive will include all control panel configurations and data related to the user account and user's domains (website's), including the information on resource allotments and permissions to perform operations within the control panel.
Backup individual domains (website's). The backup archive will include all data related to domain administrator's account, domain (website) and mail services, including the contents of mailboxes, Horde Turba address book contact lists, anti-spam and anti-virus settings.
Schedule backups. To schedule a backup of entire server, you will need to add a cron task that will run the backup utility on schedule. Scheduling backup of user accounts and domains can be done through the control panel.
Restore your data from backup archives.
Your customers granted with the permission to use the backup and restore facilities can back up and restore their own account settings and website's through the control panel.
Backing up the entire server
To backup the server configuration settings and all user data you have on your hosting machine:
- Log in as root to your server.
- Change to the directory, where Plesk is installed:
cd /plesk_installation_directory/bin
- Run the following command:
./pleskbackup all <filename>
Insert a target backup file name with absolute or relative path in the place of filename. The data will be backed up without disruption of hosting services and downtime. The resulting backup archive will be placed in the directory you specified.
Backing up individual user accounts with domains
To back up a user account with domains:
- Click the Clients shortcut in the navigation pane.
- Click the client name you need.
- Click the Back Up icon in the Tools group.
- If you want to backup and store the backup file on an FTP server, click the FTP repository tab, then click FTP Account Properties to specify the destination FTP server.
- Click the Backup Now icon in the Tools group.
- Specify the backup file name and give a description to the backup file.
- To create a multivolume backup, select the respective checkbox and specify volume size in megabytes.
- Select the repository where you would like to store the backup file.
- To save the user account settings, select the backup client's preferences and account details checkbox.
- Select the domains to back up.
- To back up individual domains, select the corresponding checkboxes in the list of domains.
- To back up all user's domains, select the checkbox in the upper left corner of the list of domains.
- Click Back Up Now.
- The backup will start and the progress will be shown. To update the information on the screen, click Refresh.
- Upon completion of the backup process, click OK. The backup file will be saved to the location you chose, and will be accessible either from the FTP server, or from the location Clients > client name > Backup.
Backing up individual domains (websites)
To back up a domain (website):
- Click the Domains shortcut in the navigation pane.
- Click the domain name you need.
- Click the Back Up icon in the Domain group.
- If you want to back up and store the backup file on an FTP server, click the FTP repository tab, then click FTP Account Properties to specify the destination FTP server, if you have not done so yet.
- Click the Backup Now icon in the Tools group.
- Specify the backup file name and give a description to the backup file.
- To create a multivolume backup, select the respective checkbox and specify the volume size in megabytes.
- Select the repository where you would like to store the backup file.
- Click Back Up Now.
- The backup will start and the progress will be shown. To update the information on the screen, click Refresh.
- Upon completion of the backup process, click OK. The backup file will be saved to the location you selected, and will be accessible either from the FTP server, or from the location Domains > domain name > Backup.
Scheduling backups
To schedule backup of the server configuration and all user data:
- Click the Server shortcut in the navigation pane.
- Click the Scheduled Tasks icon in the Services group.
- Click Add New Task.
- Specify when to run the backup.
- Minute - enter a value from 0 - 59
- Hour - enter a value from 0 - 23
- Day of the month - enter a value from 1 - 31
- Month - enter a value from 1 - 12, or select the month from a drop-down box
- Day of the week - enter a value from 0 - 6 (0 for Sunday), or choose the day of the week from a drop-down box
You can schedule the time using the UNIX crontab entry format. In this format, you can:
- Enter several values separated by commas. Two numbers separated by a hyphen mean an inclusive range. For example, to run a task on the 4th, 5th, 6th, and 20th of a month, type 4-6,20.
- Insert an asterisk to specify all values allowed for this field. For example, to run a task daily, type * in the Day of the Month text box.
To schedule the task to run every Nth period, enter the combination */N, where N is a legal value for the field (minute, hour, day, month). For example, */15 in the Minute field schedules the task to start every 15 minutes.
You can type the contracted names of months and days of the week, which are the first three letters: Aug, Jul, Mon, Sat, etc. However, the contracted names cannot be separated with commas or used together with numbers.
- Specify the command in the Command input box:
usr/local/psa/bin/pleskbackup all <filename>
Insert a target backup file name with absolute or relative path in the place of filename.
- Click OK.
The data will be backed up without disruption of hosting services and downtime. The resulting backup archive will be placed in the directory you specified.
Restoring data from backup archives
You can restore data backed up by the Plesk 7.5.4 control panel. Before you restore such data, you need to log in as root to your server and run the conversion utility for each backup file as follows:
plesk_installation_directory/bin/backup-convert.py convert -o <new backup file> <old backup file>, where new backup file is the path to the new backup file to be created and old backup file is the backup file created by Plesk 7.5.4.
To restore the server configuration and all user data from a backup file:
- Log in as root to your server.
- Change to the directory where Plesk is installed:
cd /plesk_installation_directory/bin
- Generate a file that defines mapping of items (user accounts, sites, etc.) stored in the backup file to the items currently served by your Plesk hosting platform. To do this, run the following command from the command line:
./pleskrestore --create-map -map
A mapping file will be generated and saved to the specified location. In most cases you will not need to edit this file. But make sure you review its contents and specify mapping for items only if you want to specify individual objects to restore, or the restoration of data fails due to object conflicts. For example, this might happen if the range of IP addresses listed in the backup file differs from those available on the server.