Specifying Data for Backing Up

Defining data that should be backed up includes the following:

  1. Defining backup level and, unless it is the server level, optionally, selecting which resellers, customers, or subscriptions should be backed up.
  2. (optional) Defining which resellers, customers, or subscriptions should be excluded from the backup.
  3. (optional) Restricting backup to either only mail or only web hosting settings, and only to configuration.
  4. (optional) Defining that log files are excluded from backup.

Generally speaking, the data that can be backed up with one call of the pleskbackup utility are represented by any single cell of the following table.

 

(All)

Only web hosting settings

option: --only-hosting

Only mail

option: --only-mail

(All)

Only configuration

option: -c

(All)

Only configuration

option: -c

(All)

Only configuration

option: -c

Server

command:

--server

(All)

 

 

 

 

 

 

Excluding resellers

options:

--exclude-reseller or

--exclude-reseller-file

 

 

 

 

 

 

Excluding customers

options:

--exclude-client or

--exclude-client-file

 

 

 

 

 

 

Excluding subscriptions

options:

--exclude-domain or

--exclude-domain-file

 

 

 

 

 

 

All or selected resellers

command:

--resellers-name

or

--resellers-id

(All) / (All selected)

 

 

 

Example 1

 

 

Excluding resellers

options:

--exclude-reseller or

--exclude-reseller-file

 

 

 

Example 1*

 

 

Excluding customers

options:

--exclude-client or

--exclude-client-file

 

 

 

 

 

 

Excluding subscriptions

options:

--exclude-domain or

--exclude-domain-file

 

 

 

 

 

 

All or selected customers

command:

--clients-name

or

--clients-id

(All) / (All selected)

 

 

 

 

 

 

Excluding customers

options:

--exclude-client or

--exclude-client-file

 

 

 

 

 

 

Excluding subscriptions

options:

--exclude-domain or

--exclude-domain-file

 

 

 

 

 

 

All or selected subscriptions

command:

--domains-name

or

--domains-id

(All) / (All selected)

 

 

 

 

Example 2

 

Excluding subscriptions

options:

--exclude-domain or

--exclude-domain-file

 

 

 

 

 

 

Example 1: With one call of pleskbackup, you can back up hosting data for several resellers (row 5 or 6 in the table, depending on what is more convenient: to list resellers that should be included or those excluded) and restricting the backup data to configuration of web hosting on sites owned by the resellers or their customers (column 4 in the table).

To back up website hosting configuration of resellers with usernames reseller1 and reseller2, issue the following command:

pleskbackup --resellers-name "reseller1 reseller2" --only-hosting -c

Note: Do not press Ctrl+C while a backup task is running. Doing so will result in a failed backup task.

Example 2: With one call of pleskbackup, you can back up mail configuration and content of mail accounts (column 5) for all subscriptions existing on the server (row 12).

To back up mail accounts with messages for all subscriptions:

pleskbackup --domains-name --only-mail

The rest of this section explains each option in detail and provides examples of commands. 

Defining backup level and selecting objects

To define backup level and select backup objects, the commands of pleskbackup utility are used.

If performing a selective backup, resellers, customers or subscriptions selected for the backup should be specified by their identifiers which are either usernames or IDs. The specification can be done in one of the following two ways:

To back up all data related to Plesk installation:

pleskbackup --server

To back up all resellers, customers, or subscriptions:

pleskbackup --<resellers|clients|domains>-<name|id>

For example, to back up all customer accounts:

pleskbackup clients-name

or

pleskbackup clients-id

To back up several resellers, customers, or subscriptions defined in the command line:

pleskbackup --<resellers|clients|domains>-<name|id> [
<identifier1> [
<identifier2> ... [<identifier n>]]

For example, to back up three resellers defined in the command line:

pleskbackup --resellers-name "johndoe janedoe josephine"

To back up several resellers, customers, or subscriptions listed in a file:

pleskbackup --<resellers|clients|domains>-<name|id> --from-file=<file>

For example,

pleskbackup --resellers-name --from-file="E:\backup lists\j.txt"

Defining which objects should be excluded

Objects that should be excluded from backup are specified by their usernames (reseller, customer accounts) or domain names (subscriptions). The specification can be done as follows:

To back up all reseller accounts except for several selected resellers:

pleskbackup --resellers-name --exclude-reseller=<login1>,<login2>[,<login n>]

or

pleskbackup --resellers-name --exclude-reseller-file=<file>

For example,

pleskbackup --resellers-name --exclude-reseller=johndoe,janedoe

or

pleskbackup --resellers-name --exclude-reseller-file="E:\backup lists\j.txt"

To back up a selected reseller without several subscriptions belonging to him or her, or his or her customers:

pleskbackup --resellers-name <username> --exclude-domain=<name1>,<name2>,<name n>

or

pleskbackup --resellers-name <username> --exclude-domain-file=<file>

For example,

pleskbackup --resellers-name johndoe --exclude-domain=example.com,example.net,example.org

or

pleskbackup --resellers-name johndoe --exclude-domain-file="D:\backup-lists\excl-example-domains.txt"

Restricting backup to only mail or only physical hosting, and to only configuration

The amount of backup data can be further narrowed to backing up either mail or physical hosting content and configuration by using the --only-mail or --only-hosting options, respectively.

Specifying the --only-hosting option results in backing up only website-specific data which includes the following, for each domain with physical hosting:

Specifying the --only-mail option results in backing up only mail-specific data which includes the following:

The amount of backup data can also be narrowed in another way: by specifying that only configurations of the selected objects should be backed up. The specification is done by using the --only-configuration option.

Such backups are useful when the objects content is backed up by a third-party system.

To back up mail configuration on subscriptions belonging to a customer:

pleskbackup --clients-<name|id> <name|id> --only-mail --configuration 

For example,

pleskbackup --clients-id 42 --only-mail --configuration

To back up websites content and hosting configuration on subscriptions belonging to all resellers:

pleskbackup --resellers-id --only-hosting

Excluding log files from back up

In case Plesk's log files related to the hosted objects are not required to be backed up, they can be excluded from the backup by using the --skip-logs option.

To back up the Plesk configuration without log files:

pleskbackup --server -c --skip-logs