For cPanel & WHM 11.46
/scripts/restorepkg script restores a backup archive for a specified account.
- You can also restore a backup with WHM's Restore a Full Backup cpmove File interface (Home >> Backup >> Restore a Full Backup/cpmove File).
- This Script restores suspended accounts in an unsuspended state. Use WHM's Manage Account Suspension interface (Home >> Account Functions >> Manage Account Suspension) or call the WHM API 1 Functions - suspendacct function to suspend the account again.
How to call the script
To run the restore package script at the command line, run the following command as the
argument with one or more arguments from the
/scripts/restorepkg script's list of arguments.
File formats and archive locations
The filename of the backup must use one of the following formats:
Incremental backup files must use the
The restore package script searches for the archive in the following locations:
After the script locates the correct archive, it will attempt to restore the account with the shared IP address.
The table below lists the arguments that the
/scripts/restorepkg scrips accepts.
|This argument forces the restore package script to restore the account regardless of any errors or warnings. When the system restores the account, any existing data remains intact on the server.||N/A|
|This argument allows the script to restore reseller privileges.||N/A|
|This argument specifies which IP address you will use to restore the account.||string (See below for usage instructions)|
This argument allows you to change the username for the account that you restore.
|This argument allows you to restore a package for an existing account with the same username as another existing account.||N/A|
|This argument was deprecated in cPanel & WHM version 11.44. If your legacy script uses this argument, it will perform the opposite of the ||N/A|
|This argument was deprecated in cPanel & WHM version 11.44. If you wish to use override scripts, create them in the |
Use the --ip argument
--ip argument takes one of the following options:
|This option uses the next available IP address in the IP Address Pool to restore the account. If none are available, the script uses the shared IP address.|
|This option uses the shared IP address to restore the account.|
|This option uses the specified IP address to restore the account. If that IP address is not available, the script uses the shared IP address.|
For example, the following command will restore the