Defining Objects for Restoration

Defining objects for restoration includes the following:

  1. Specifying a source backup file.
  2. Defining the level of restored objects.
  3. Applying filter on the specified level.

Generally speaking, the data that can be restored with one call of the pleskrestore utility are represented by any cell of the following table.

 

Restoration levels specified with the -level option

Server

Resellers

Customers

Subscriptions

 

 

Selected with the

-filter option

 

Selected with the -filter option

 

Selected with the -filter option

Backup file

<server>.xml | zip

Full restoration

All reseller accounts

Selected reseller accounts

All customer accounts belonging to administrator

Selected customer accounts belonging to administrator

All subscriptions belonging to administrator

Selected subscriptions belonging to administrator

<reseller>.xml | zip

 

Full restoration of a reseller account

 

All customer accounts belonging to reseller

Selected customer accounts belonging to reseller

All subscriptions belonging to reseller

Selected subscriptions belonging to reseller

<customer>.xml | zip

 

 

 

Full restoration of a customer account

 

All subscriptions belonging to customer

Selected subscriptions belonging to customer

<subscription>.xml | zip

 

 

 

 

 

Full restoration of a subscription

 

Specifying a source backup file

The source backup file defined for restoration can be of one of the following types:

  • <info>.xml - backup metadata file, in case of restoring from backup located in Plesk's storage.
  • <backup>.<zip> - archived backup file, in case of restoring from an exported backup.

For example, to restore the whole server backup, you choose a <backup storage root>\<server>.xml file, or an exported server backup file. To restore a customer account belonging to a reseller, you choose a <backup storage root>\resellers\<reseller ID>\clients\<customer ID>\<customer>.xml file.

Defining level of restored objects

Defining level of restored objects allows you to narrow the amount of restored data according to your needs. For example, you may want to restore only subscriptions which belong to a customer or a reseller, skipping all other data not related to subscriptions.

To define the level of restored objects, use the -level option with appropriate value. The option is required, so in cases when you do not need any narrowing but just restoring all data from a backup, define the level equal to the level of file.

To restore entire server:

pleskrestore --restore <backup storage root>\<server>.xml -level server

Note: When the whole server backup is restored, license keys are not restored by default. To restore license keys along with other server content, use the -license option in your restore command.

To restore entire server with license keys:

pleskrestore --restore <backup storage root>\<server>.xml -level server -license

To restore all subscriptions and sites belonging to a reseller:

pleskrestore --restore <backup storage root>\resellers\<reseller ID>\<reseller>.xml -level domains

To restore all reseller accounts:

pleskrestore --restore <backup storage root>\<server>.xml -level resellers
Applying filter on the specified level

To perform a more selective restore, use a filter (the -filter option) which selects for restoring particular objects of the specified level (resellers, customers, subscriptions). The objects are specified by their names, which are domain names for subscriptions, and usernames for resellers and customers. The specification can be done as follows:

  • Command line specification. The restore command takes objects identifiers as values of the -filter option defined in the following string: list:<item1>,<item2>,...,<itemN>.
  • File specification. The restore command takes the objects identifiers from the file specified as argument of the -filter option. The file must be in plain text format, and object identifiers are separated by line breaks (that is, one identifier per line).

To restore two resellers from a server backup:

pleskrestore --restore <backup storage root>\<server>.xml -level resellers -filter list:JohnDoe,JaneDoe

or

pleskrestore --restore <upload directory>\<server backup name>.zip -level resellers -filter list:JohnDoe,JaneDoe

 

To restore two subscriptions owned by server administrator:

pleskrestore --restore <backup storage root>\<server>.xml -level domains -filter list:example.com,sample.org

 

To restore several subscriptions of a customer defined in a file:

pleskrestore --restore <backup storage root>\resellers\SandyLee\clients\JaneDow\<customer>.xml -level domains -filter <path to the file>\restore-subscriptions.txt

Next in this section:

Backup File Structure