pleskrestore: Restoration from Backup
The pleskrestore
utility is used for restoring data from backup
archives.
Usage
pleskrestore <command> [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]
Example
The following command restores only databases from the Backup-file
file.
plesk bin pleskrestore --restore "Backup-file" -only-databases
Commands
Command | Parameter | Description | Example |
---|---|---|---|
--restore |
<backup_file> |
Restores a backup file. |
To restore the backup file Backup-file: plesk bin pleskrestore --restore "Backup-file" |
--check-backup |
<backup_file> |
Checks a backup file integrity. |
To check the integrity of the backup file Backup-file: plesk bin pleskrestore --check-backup "Backup-file" |
--info or -i |
<backup_file> |
Shows description of a backup file. |
To view description of the backup file Backup-file: plesk bin pleskrestore --info "Backup-file" or plesk bin pleskrestore -i "Backup-file" |
--get-restore-task-status |
<task-id> |
Shows the status code of an asynchronous restoration task (for example, code |
To view the status of the restoration task with the ID 123: plesk bin pleskrestore --get-restore-task-status "123" |
--help or -h |
Displays help on the use of the utility. |
To view help on the use of the utility: plesk bin pleskrestore --help or plesk bin pleskrestore -h |
|
--man or -m |
Displays detailed help on the use of the utility with the examples. |
To view detailed help on the use of the utility: plesk bin pleskrestore --man or plesk bin pleskrestore -m |
Options
Option | Parameter | Description | Example |
---|---|---|---|
-level |
<clients|domains|resellers|server> |
Specifies the restoration level: restores customers, resellers, or domains from backup, or restores a server-wide backup. |
To restore the server-wide backup from the backup file Backup-file: plesk bin pleskrestore --restore "Backup-file" -level server |
-filter |
<file|-|list:item1[,...]> |
Specifies a list of domains, customers, or resellers for
restoration. The list may be read from a file, stdin , or
specified as an option parameter in a comma-separated list. |
To restore the domains domain1 and domain2 from the backup file Backup-file: plesk bin pleskrestore --restore "Backup-file" -level domains -filter domain1,domain2 |
-only-mailnames |
<file|list:item1[,...]> |
Specifies a list of mailboxes for restoration. The list can be
read from a file or specified in a comma-separated list. The
format of a list item is Use the additional option |
To restore the mailbox mail@example.com for the subscription Example from the backup file Backup-file: plesk bin pleskrestore --restore "Backup-file" -only-mailboxes "mail@example.com" -domain-name "Example" |
-only-maillists |
<file|list:item1[,...]> |
Specifies a list of mailing lists for restoration. The list can
be read from a file or specified in a comma-separated list. The
format of a list item is Use the additional option |
To restore the maillist maillist@example.com for the subscription Example from the backup file Backup-file: plesk bin pleskrestore --restore "Backup-file" -only-maillists "maillist@example.com" -domain-name "Example" |
-only-databases |
<file|list:item1[,...]> |
Specifies a list of databases for restoration. The list can be
read from a file or specified in a comma-separated list. The
format of a list item is
Use the additional option |
To restore databases specified in the file databases-list for the subscription Example from the backup file Backup-file: plesk bin pleskrestore --restore "Backup-file" -only-databases "databases-list" -domain-name "Example" |
-only-web-content |
<file|list:item1[,...]> |
Specifies a list of files or directories for restoration. The list can be read from a file or specified in a comma-separated list. Paths to files and directories should be relative to the subscription root. Use the additional option |
To restore files and directories specified in the file directories-list for the subscription Example from the backup file Backup-file: plesk bin pleskrestore --restore "Backup-file" -only-web-content "directories-list" -domain-name "Example" |
-only-sites |
<file|list:item1[,...]> |
Specifies a list of sites for restoration. The list can be read
from a file or specified in a comma-separated list. The format
of a list item is Use the additional option |
To restore sites specified in the file sites-list for the subscription Example from the backup file Backup-file: plesk bin pleskrestore --restore "Backup-file" -only-sites "sites-list" -domain-name "Example" |
-only-dns-zones |
<file|list:item1[,...]> |
Specifies a list of DNS zones for restoration. The list can be
read from a file or specified in a comma-separated list. The
format of a list item is Use the additional option |
To restore DNS zones specified in the file zones-list for the subscription Example from the backup file Backup-file: plesk bin pleskrestore --restore "Backup-file" -only-dns-zones "zones-list" -domain-name "Example" |
-only-certificates |
<file|list:item1[,...]> |
Specifies a list of SSL/TLS certificates for restoration. The
list can be read from a file or specified in a comma-separated
list. The format of a list item is
Use the additional option Use the additional option |
To restore SSL/TLS certificates specified in the file certificates-list for the subscription Example from the backup file Backup-file: plesk bin pleskrestore --restore "Backup-file" -only-certificates "certificates-list" -domain-name "Example" |
-domain-name |
<domain_name> |
Specifies the domain name. Used with the -only-mailnames ,
-only-maillists , -only-databases ,
-only-web-content , -only-dns-zones , -only-sites ,
and -only-certificates options. |
To restore files and directories specified in the file directories-list for the subscription Example from the backup file Backup-file: plesk bin pleskrestore --restore "Backup-file" -only-web-content "directories-list" -domain-name "Example" |
-configuration-only |
Restores only configuration (without content). Used with the |
To restore only configuration of sites specified in the file sites-list for the subscription Example from the backup file Backup-file: plesk bin pleskrestore --restore "Backup-file" -only-sites "sites-list" -configuration-only -domain-name "Example" |
|
-content-only |
Restores only content (without configuration). Used with the |
To restore only content of sites specified in the file sites-list for the subscription Example from the backup file Backup-file: plesk bin pleskrestore --restore "Backup-file" -only-sites "sites-list" -content-only -domain-name "Example" |
|
-server-pool |
Restores SSL/TLS certificates only from the server pool. Used with the |
To restore SSL/TLS certificates specified in the file certificates-list and belonging to the server pool for the subscription Example from the backup file Backup-file: plesk bin pleskrestore --restore "Backup-file" -only-certificates "certificates-list" -server-pool -domain-name "Example" |
|
-license |
Restores the Plesk license key. |
To restore the Plesk license from the backup file Backup-file: plesk bin pleskrestore --restore "Backup-file" -license |
|
-quiet |
Enables the quiet restoration mode. |
To restore the backup file Backup-file in the quite mode: plesk bin pleskrestore --restore "Backup-file" -quite |
|
-verbose |
Restores the backup in verbose mode.
Note:
If you run the backup restoration in verbose mode, you will see the command status upon the command execution. |
To restore the backup file Backup-file in verbose mode: plesk bin pleskrestore --restore "Backup-file" -verbose |
|
-debug |
Enables debugging during restoration. |
To restore the backup file Backup-file in the debugging mode: plesk bin pleskrestore --restore "Backup-file" -debug |
|
-nowarning |
Hides warning messages during restoration of a server-wide backup. Used with the |
To restore the server-wide backup from the backup file Backup-file without showing warning messages: plesk bin pleskrestore --restore "Backup-file" -level server -nowarning |
|
-dump-file |
<backup_file> |
Specifies a dump file for restoration. Should be used as |
To restore the backup from the dump file File: plesk bin pleskrestore -dump-file "File" |
-param-file |
<param_file> |
Specifies a parameters file. Should be used as |
To restore the backup from the parameters file File: plesk bin pleskrestore -param-file "File" |
-conflicts-resolution |
<file> |
Specifies a file with conflict resolution rules. Used with the |
To restore the backup from the backup file Backup-file with the conflict resolution rules specified in the Conflict-rules file: plesk bin pleskrestore --restore "Backup-file" -conflict-resolution "Conflict-rules" |
-backup-password |
<password> |
If you used password protection for a backup, use this option to specify the password. You can also set the password with the PLESK_BACKUP_PASSWORD environment variable. |
To restore the backup protected with the password PaSsWoRd from the backup file Backup-file: plesk bin pleskrestore --restore "Backup-file" -backup-password "PaSsWoRd" |
-ignore-backup-password |
Allows you to restore a backup without providing the backup password. Note that in this case, some sensitive data will not be restored properly. For example, user passwords will be replaced with random ones, the information about already installed APS apps will be lost, and so on. |
To restore the backup protected with the password without providing the password from the backup file Backup-file: plesk bin pleskrestore --restore "Backup-file" -ignore-backup-password |
|
-ignore-sign |
Restores a backup file despite a corrupted signature. |
To restore the backup from the backup file Backup-file despite a corrupted signature: plesk bin pleskrestore --restore "Backup-file" -ignore-sign |
|
-async |
Restores a backup file asynchronously. It returns the
restoration task ID, which you can use to retrieve the
task status code by running the Used with the |
To restore the backup from the backup file Backup-file asynchronously: plesk bin pleskrestore --restore "Backup-file" -async |
pleskrestore: Command Statuses and Status Codes
If you run the pleskrestore --restore
command in verbose mode, you will see the command status upon the command execution.
The status informs you how a backup was restored (for example, fully and without any issues or partially and with warnings).
If you run the pleskrestore --restore
command with the -async
option, you will get the restoration task ID.
You can then use this ID to run pleskrestore --get-restore-task-status
to see the response code of the restoration task (for example, 204
(“success”) or 202
(“warning”)).
The table below shows all possible statuses and status codes of the pleskrestore --restore
command.
Command status | Meaning | Response Status Code |
---|---|---|
success |
All data was restored from the backup. The restoration was completed without any issues. |
204 —“success” |
info |
All data was restored from the backup. The restoration was completed with information messages. |
202 —“info” |
warnings |
Not all data was restored from the backup. The restoration was completed with warning messages. |
202 —“warning” |
error |
No data was restored from the backup. The restoration failed. |
201 —“error” |
No status name | The restoration is in progress and was not completed yet. |
200 —“working” |