pleskbackup: Backing Up Content and Configuration
The pleskbackup
utility is used for backing up configuration and
data.
Usage
pleskbackup <command> [<arguments>] [<options>]
Example
The following command backs up the Plesk server excluding the customers
listed in the customers.txt
file and displays information about the
backup process:
plesk bin pleskbackup --server -exclude-client-file customers.txt -v
Note: To improve backup security, we recommend that you protect backups
with a password. Thus, if the security of your backup storage is
compromised, an attacker will not get sensitive data. To provide
passwords for backups and the FTP server where you will upload
backups, use the PLESK_BACKUP_PASSWORD
and FTP_PASSWORD
environment variables respectively.
Note: Plesk does not protect all sensitive data in a backup. We recommend that you store backups in remote cloud storage and enable backup encryption on the cloud storage side.
Commands
Command | Argument | Description | Example |
---|---|---|---|
--server |
Backs up the whole Plesk server. |
To back up the Plesk server: plesk bin pleskbackup --server |
|
--resellers-name |
<login-1> <login-2> <login-n> |
Backs up all data of the resellers whose logins you specify. Separate the logins with spaces. Can be used with the -from-file option. If you specify neither logins nor the |
To back up the reseller with the login name reseller1: plesk bin pleskbackup --resellers-name reseller1 |
--resellers-id |
<ID1> <ID2> <IDn> |
Backs up all data of the resellers whose IDs you specify. Separate the IDs with spaces. Can be used with the -from-file option. If you specify neither IDs nor the |
To back up the reseller with the ID 1: plesk bin pleskbackup --resellers-id 1 |
--clients-name |
<login-1> <login-2> <login-n> |
Backs up all data of the customers whose logins you specify. Separate the logins with spaces. Can be used with the -from-file option. If you specify neither logins nor the |
To back up all data of the customers with the logins user1 and user2: plesk bin pleskbackup --clients-name user1 user2 |
--clients-id |
<ID1> <ID2> <IDn> |
Backs up all data of the customers whose IDs you specify. Separate the IDs with spaces. Can be used with the -from-file option. If you specify neither IDs nor the |
To back up the customer with the ID 1: plesk bin pleskbackup --clients-id 1 |
--domains-name |
<name-1> <name-2> <name-n> |
Backs up all data of the subscriptions whose names you specify. Separate the subscription names with spaces. Can be used with the -from-file option. If you specify neither subscription names nor the |
To back up the subscription with the name example.com: plesk bin pleskbackup --domains-name example.com |
--domains-id |
<ID1> <ID2> <IDn> |
Backs up all data of the subscriptions whose IDs you specify. Separate the IDs with spaces. Can be used with the -from-file option. If you specify neither IDs nor the |
To back up the subscription with the ID 1: plesk bin pleskbackup --domains-id 1 |
--help or -h
|
Displays the help on the utility usage. |
To see the help on the utility usage: plesk bin pleskbackup --help or plesk bin pleskbackup -h |
General Options
Option | Description | Example |
---|---|---|
-from-file | -f <file>
|
Backs up resellers | customers | subscriptions listed in the specified file ignoring those specified in the command line as arguments. The file must be in plain text and must contain the list of resellers | customers | subscriptions, one per line. Used only with the Depending on the command, resellers | customers | subscriptions are listed in the file by either logins, IDs, or domain names. |
To back up the subscriptions whose names are specified in the plesk bin pleskbackup --domains-name -f domains.txt |
-v | -verbose
|
Shows more information about the backup process. Multiple -v options increase verbosity.
For maximum verbosity, specify five options. |
To back up the Plesk server and show the backup process in most detail: plesk bin pleskbackup --server -v -v -v -v -v |
-c | -configuration
|
Backs up only configurations of Plesk objects excluding their content. |
To back up only configurations of Plesk objects on the Plesk server: plesk bin pleskbackup --server -c |
-compression-level <no-compression|fastest|fast|normal|maximum> |
Specifies how fast and how well Plesk compresses the data being backed up. You can specify the following compression levels: fastest, fast, normal, maximum, or no compression. The faster the compression level, the bigger the backup size and the lower CPU load is. If you do not specify the |
To back up the Plesk server using the maximum compression level (the smallest backup size, the slowest backup speed, the highest CPU load): plesk bin pleskbackup --server -compression-level maximum |
-s | -split <size>[B|K|M|G|T]
|
Splits backup files into parts of the specified size.
The parts are numbered by appending numerical suffixes starting with You can specify the size in bytes, KB, MB, GB, or TB. If you specify no unit, the size is interpreted as being in bytes. If you specify no arguments, the default size of 2 GB is used. |
To back up the Plesk server and split the backup into parts of 3 GB: plesk bin pleskbackup --server -s 3G |
-only-mail |
Backs up only mail configuration and content of the selected objects. When used with the When used with the Cannot be used with the |
To back up the configuration and content of mail accounts and the configuration of the domail-level mail system of the subscription example.com: plesk bin pleskbackup --domains-name example.com -only-mail |
-only-hosting |
Backs up only hosting configuration and website content including website applications, databases, and subdomains. Cannot be used with the |
To back up the hosting configuration and content of the subscription example.com: plesk bin pleskbackup --domains-name example.com -only-hosting |
-prefix <string> |
Adds the specified prefix to the backup file name. Used to customize backup file names, which have the “backup” prefix by default. |
To back up the Plesk server and add the “main” prefix to the backup file name: plesk bin pleskbackup --server -prefix main |
-incremental |
Creates an incremental backup (a backup that contains only the data that was changed since the time of the last previously created backup). If no full backup is available, the option will be ignored. |
To create an incremental backup of the Plesk server: plesk bin pleskbackup --server -incremental |
-d | -description '<description>'
|
Adds a description to a backup. The description will be displayed in the “Comments” column in the Plesk interface. To add the description, enclose it in quotes. |
To back up the Plesk server and add the description “This is my first backup” to the backup file: plesk bin pleskbackup --server -description 'This is my first backup' |
FTP Options
Option | Description | Example |
---|---|---|
-ftp-server <ftp-server-hostname-or-IP> |
Specifies the FTP server to upload a backup file to. |
To back up the Plesk server and store the backup on the FTP server with the IP address 192.168.0.1: FTP_PASSWORD=ftp_password plesk bin pleskbackup --server -ftp-server 192.168.0.1 -ftp-login ftp_login |
-ftp-login <ftp_login> |
Specifies the FTP login for the FTP server where the backup file will be stored. |
To back up the Plesk server and log in to the FTP server using the FTP_PASSWORD=ftp_password plesk bin pleskbackup --server -ftp-server 192.168.0.1 -ftp-login ftp_login |
-ftp-path <ftp_path> |
Specifies the path on the FTP server to store the backup file. |
To back up the Plesk server and store the backup on the FTP server in the FTP_PASSWORD=ftp_password plesk bin pleskbackup --server -ftp-server 192.168.0.1 -ftp-login ftp_login -ftp-path /tmp/ |
-ftp-passive-mode |
Specifies to use passive FTP mode when connecting to the FTP server to store the backup file. |
To back up the Plesk server and connect to the FTP server in passive FTP mode to store the backup file: FTP_PASSWORD=ftp_password plesk bin pleskbackup --server -ftp-server 192.168.0.1 -ftp-login ftp_login -ftp-passive-mode |
-use-ftps |
Specifies to use FTPS instead of insecure FTP when connecting to the FTP server to store the backup file. |
To back up the Plesk server and connect to the FTP server using FTPS to store the backup file: FTP_PASSWORD=ftp_password plesk bin pleskbackup --server -ftp-server 192.168.0.1 -ftp-login ftp_login -use-ftps |
Exclude Options
Option | Description | Example |
---|---|---|
-exclude-reseller <login-1>,<login-2>,<login-n> |
Skips the resellers with the specified logins during backup. Separate the logins with commas. If no logins are specified, no resellers are backed up. |
To back up the Plesk server excluding all the resellers: plesk bin pleskbackup --server -exclude-reseller |
-exclude-reseller-file <file> |
Skips resellers listed in the specified file during backup. The file must be in plain text and must contain the list of reseller logins, one per line. |
To back up the Plesk server excluding the resellers specified in the plesk bin pleskbackup --server -exclude-reseller-file resellers.txt |
-exclude-client <login-1>,<login-2>,<login-n> |
Skips customers with the specified logins during backup. Separate the logins with commas. If no logins are specified, no customers are backed up. |
To back up the Plesk server excluding the customers with the login names user1 and user2: plesk bin pleskbackup --server -exclude-client user1,user2 |
-exclude-client-file <file> |
Skips customers listed in the specified file during backup. The file must be in plain text and must contain the list of customer logins, one per line. |
To back up the Plesk server excluding the customers listed in the plesk bin pleskbackup --server -exclude-client-file customers.txt |
-exclude-domain <name-1>,<name-2>,<name-n> |
Skips subscriptions with the specified names during backup. Separate the subscription names with commas. If no subscription names are specified, no subscriptions are backed up. |
To back up the Plesk server excluding the subscriptions example.com and example.net: plesk bin pleskbackup --server -exclude-domain example.com,example.net |
-exclude-domain-file <file> |
Skips subscriptions listed in the specified file during backup. The file must be in plain text and must contain the list of subscription names, one per line. |
To back up the Plesk server excluding the subscriptions listed in the plesk bin pleskbackup --server -exclude-domain-file domains.txt |
-exclude-pattern <path-1>,<path-2>,<path-n> |
Skips files and directories with the specified paths during backup. You can only exclude files within subscriptions. Specify the path or paths relative to the subscription root separating individual files with commas. You can use the mask character (*). |
To back up the Plesk server excluding files with the names starting
with plesk bin pleskbackup --server -exclude-pattern /somedir/log* |
-exclude-pattern-file <file> |
Skips files and directories listed in the specified file during backup. You can only exclude files within subscriptions. Specify the path or paths relative to the subscription root in the file, one per line.
You can use the mask character (*), for example |
To back up the Plesk server excluding files and directories listed in the plesk bin pleskbackup --server -exclude-pattern-file patterns.txt |
-exclude-logs |
Skip log files during backup. |
To back up the Plesk server excluding log files: plesk bin pleskbackup --server -exclude-logs |
Output File Options
Option | Description | Examples |
---|---|---|
-output-file |
Exports a backup as a single file to stdout and removes the backup from the Plesk server storage. |
To back up the subscription with the ID 1 and export the backup to plesk bin pleskbackup --domains-id 1 -output-file stdout |
-output-file <full_path_to_directory>/ | <full_path_to_directory>/filename> |
Exports a backup as a single file to the specified directory on a local file system and removes the backup from the Plesk server storage. As an argument, you can specify either the path to the directory (and then the backup file name will be automatically generated) or the path to the directory and the desired backup file name.
Note:
To create an incremental backup (the |
To create an incremental backup of the subscription with the ID 1 and export the backup to the plesk bin pleskbackup --domains-id 1 -output-file /tmp/ -incremental To back up the subscription with the ID 1 and export the backup as the plesk bin pleskbackup --domains-id 1 -output-file /tmp/domain1.tar |
-output-file [ftp|ftps]://[<login>@]<server>/<full_path_to_directory>/|<full_path_to_directory>/filename> |
Exports a backup as a single file to the specified FTP server and removes the backup from the Plesk server storage. You can use FTP options to specify the FTP server credentials and FTP connection settings (for example, FTPS usage). As an argument, you can specify either the path to the directory (and then the backup file name will be automatically generated) or the path to the directory and the desired backup file name.
Note:
To create an incremental backup (the |
To back up the subscription with the ID 1 and export the backup as a file to the FTP_PASSWORD=ftp_password plesk bin pleskbackup --domains-id 1 -output-file ftp://john_doe@example.com/storage/backups/ To back up the subscription with the ID 1 and export the backup as the FTP_PASSWORD=ftp_password plesk bin pleskbackup --domains-id 1 --output-file ftp://example.com/storage/backups/domain1.tar -ftp-login john_doe |
-output-file ext://<path-to-remote-cloud-storage>/ |
Exports a backup as a single file to remote cloud storage (for example, Amazon S3 Backup or Google Drive Backup) and removes the backup from the Plesk server storage.
Note:
To use the option to back up to remote cloud storage, you need to configure the remote storage in the Plesk interface first. |
To back up the Plesk server to Dropbox to the storage directory plesk bin pleskbackup --server -output-file ext://dropbox-backup/server/ To back up the subscription with the ID 19 to Google Drive Backup to the storage directory plesk bin pleskbackup --domains-id 19 -output-file ext://google-drive-backup/subscription/19/ |
-keep-local-backup |
Keeps a backup in the Plesk server storage during backing up to an output file. |
To back up the subscription with the ID 1, export the backup as
the plesk bin pleskbackup --domains-id 1 -output-file /tmp/domain1.tar -keep-local-backup |