For cPanel & WHM 11.48
You can use the
/scripts/restorepkg script to restore a backup archive for a specified account.
- You can also restore a backup from WHM's Restore a Full Backup cpmove File interface (Home >> Backup >> Restore a Full Backup/cpmove File).
/scripts/restorepkgscript restores suspended accounts in an unsuspended state. Use WHM's Manage Account Suspension interface (Home >> Account Functions >> Manage Account Suspension) or call WHM API 1's
suspendacctfunction to suspend the account again.
To use the
/scripts/restorepkg script, run the following command as the
Arguments and inputs
You can use the following arguments with the
|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|
|Restore reseller privileges.||N/A|
The IP address to use to restore the account.
Change the restored account's username.
A valid cPanel username.
|Restore a package for an existing account with the same username as another existing account.||N/A|
Run the restoration process with the Restricted Restore feature.
The Restricted Restore feature performs additional security checks on the backup file in order to mitigate the risk of transfers from unfamiliar sources. If a component of the backup file has an issue (for example, a compromised MySQL grant table or a symbolic link attack), the system does not restore that portion of the backup and adds a warning to the log file.
If you do not use this argument, the script performs an unrestricted restore.
The backup filename 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:
The script attempts to restore the account on the shared IP address with the following steps:
- Add the package to the
- Start the restoration process.
- Uses the
tailcommand to output the the log file's contents after the restoration process begins.
For example, the following command uses the unrestricted restore method to restore the
18.104.22.168 IP address: