Backing Up Plesk Data Through Command Line Interface
To back up all Plesk data, except interface skins, using CLI, run the following command in the %plesk_dir%\admin\bin\ folder (where %plesk_dir% is the system variable defining the folder where Plesk is installed):
backup.exe -f <path\filename>
Note: Specify the path and the name of the file instead of <path\filename> variable. If the path is not specified, backup file will be saved in the PLESK_DATA_DIR\Backup folder (where PLESK_DATA_DIR is the folder you selected during the installation of Plesk for the location of Plesk data)
E.g., to back up all Plesk data, except interface skins, into the C:\backup\psa folder with backup file named my_psabackup.bu, run the following command in the %plesk_dir%\admin\bin\ folder (where %plesk_dir% is the system variable defining the folder where Plesk is installed):
backup.exe -f c:\backup\psa\my_psabackup.bu
In order to use custom backup configuration for backing up Plesk data with backup.exe utility via CLI, you need to create a configuration file with required backup settings.
To create a configuration file for Plesk Backup utility:
- Start Plesk Backup utility (Start > All Programs > SWsoft > Plesk > Plesk Backup)
- Select the objects you want to back up.
- You can choose what clients and domains you want to backup by selecting the corresponding checkboxes in the Select the objects to be backed up menu.
- When selecting or deselecting a client, all domains of this client are selected and deselected as well.
- You cannot back up a domain without backing up the client it belongs to. If a domain is selected to be backed up, its owner will be automatically selected as well.
- Use Select All to select all available objects and Clear All to deselect all objects previously selected.
- Choose the appropriate backup options.
- If you are making a full backup, it is recommended that you leave the Suspend control panel services during backing up checkbox selected to ensure that backup procedure is performed correctly and that resulting backup file is not corrupted.
- If you are making selective domain backup, we recommend you to clear the Suspend control panel services during backing up checkbox and leave the Suspend domain operations during backing up checkbox selected. This will ensure that domains which are not backed up are accessible during the backup procedure.
- If you do not want to see the warning messages that are displayed if problems are encountered during the backup process, select the Do not prompt with warnings checkbox. To see the list of encountered problems, click Show Details >> on the backup results message window after the backup process is finished. Note that this button is disabled if no problems were encountered.
- Select Back up domains content to back up domains content.
- Select Back up mailboxes content to back up messages in the mailboxes.
- Select Back up databases content to back up the MySQL and local Microsoft SQL Server databases.
- Select Back up control panel configuration and server settings to back up Plesk Control Panel preferences and server-wide settings.
- Select Back up interface skins to back up currently installed inferface skins.
- Select the destination for the backup file.
- Enter a description for the backup file in the Description field.
- Select a temporary folder for backup purposes, if the hard disk partition where Plesk is installed doesn't have enough free space. Under File menu, click Set Temporary folder... and specify the required folder. Click OK.
- Save the backup configuration. Under File menu, click Save config, specify the filename and configuration file location, and click OK to confirm your choice. To load an existing backup configuration, click Load confing, find the required file and click OK.
To back up Plesk data via CLI, using custom backup configuration file:
Run the following command in the %plesk_dir%\admin\bin\ folder (where %plesk_dir% is the system variable defining the folder where Plesk is installed):
backup.exe -f <path\filename> --config-file <path\filename>
Note: Specify the path and the name of the files instead of <path\filename> variable. If the path to the backup file is not specified, backup file will be saved in the PLESK_DATA_DIR\Backup folder (where PLESK_DATA_DIR is the folder you selected during the installation of Plesk for the location of Plesk data)
E.g., to back up Plesk data using backup configuration file named basic_bu.psc located in the c:\My Documents\Plesk into the C:\backup\psa folder with backup file named my_psabackup.bu, run the following command:
backup.exe -f c:\backup\psa\my_psabackup.bu --config-file "c:\My Documents\Plesk\mypsabackup.bu"