# 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 file Backup-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 of an asynchronous restoration task. | To view the status of the restoration task 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 `<mailbox>@<domain_name>`. Use the additional option `-domain-name` to specify the subscription, for which you want to restore the mailboxes. | 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 `<mailing_list>@<domain_name>`. Use the additional option `-domain-name` to specify the subscription, for which you want to restore the mailing lists. | 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 `[<server_type>:[<server_host>:[<server_port>:]]]<database_name>`, where `server_type` is `mysql`, `mssql`, or `postgresql`. Use the additional option `-domain-name` to specify the subscription, for which you want to restore the databases. | 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 `-domain-name` to specify the subscription, for which you want to restore the files. | 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 `<domain_name>`. Use the additional option `-domain-name` to specify the subscription, for which you want to restore the sites. | 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 `<domain_name>`. Use the additional option `-domain-name` to specify the subscription, for which you want to restore the DNS zones. | 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 `<certificate_name>[:<domain_name>]`. Use the additional option `-domain-name` to specify the subscription, for which you want to restore the certificates. Use the additional option `-server-pool` to specify that only certificates from the server pool should be restored. | 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 `-level`, `-only-mailnames`, `-only-databases`, `-only-sites`, and `-only-maillists` options. | 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 `-only-mailnames`, `-only-databases`, `-only-sites`, and `-only-maillists` options. | 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 `-only-certificates` option. | 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` |  | Enables the verbose restoration mode. | To restore the backup file Backup-file in the 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 `-level` option with the `server` parameter. | 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 `--dump-file`. | 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 `--param-file`. | 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 `--restore` command. | 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 identifier, which you can use to retrieve the task status. Used with the `--restore` command. | To restore the backup from the backup file Backup-file asynchronously:
    plesk bin pleskrestore --restore "Backup-file" -async