Defining data that should be backed up includes the following:

  1. Defining the 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 content, web hosting content, or their configuration.
  4. (Optional). Specifying 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 (rows 5 or 6 in the table, depending on what is more convenient: to list resellers that should be included or those to be 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

Example 2

With one call of pleskbackup, you can back up the 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 the backup level and select backup objects, the commands of the 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:

  • Command line specification. The backup command takes object identifiers as arguments separated with spaces.

  • File specification. The backup command takes the --from-file option which specifies the file where the identifiers of objects are listed. The file must be in plain text format, and object identifiers are separated by line breaks (i.e., one identifier per line).

    Note: If a command contains both specifications, file specification is used and the command line specification is ignored.

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="etc/backup lists/backup"

Defining which objects should be excluded

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

  • Command line specification. The backup command takes objects identifiers as values of the --exclude-<reseller|client|domain> option separated by commas.

  • File specification. The backup command takes the objects identifiers from the file specified by the --exclude-<reseller|client|domain>-file option. The file must be in plain text format, and object identifiers are separated by line breaks (that is, one identifier per line).

    Note: It is acceptable to use both specifications in one command. In such a case, all specified objects are excluded from the backup.

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="etc/backup lists/backup"

To back up a selected reseller without several subscriptions belonging to them or their 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="etc/backup lists/backup"

Restricting backup to only mail content, only hosting content, or only their 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:

  • website content (including protected directories, web users, MIME types)
  • web hosting configuration (including settings of anonymous FTP, log rotation, hotlink protection, web users)
  • installed site applications
  • databases
  • subdomains

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

  • if used for the partial backup, for each domain included in the backup:
    • configuration of per-subscription mail settings
    • mail accounts
    • mailing lists
  • if used for the full backup, in addition to previous:
    • RBL protection settings
    • ACL white and black list configurations

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. This specification is made 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

If 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