You can use the
/usr/local/cpanel/scripts/restorepkg script to restore a backup archive for a specified account.
- You can also restore a backup from WHM's interface (WHM >> Home >> Backup >> Restore a Full Backup/cpmove File).
/usr/local/cpanel/scripts/restorepkgscript restores suspended accounts in an unsuspended state. Use WHM's interface (WHM >> Home >> Account Functions >> Manage Account Suspension) or call WHM API 1's
suspendacctfunction to suspend the account again.
To use the
/usr/local/cpanel/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.
If the account already exists on the server, this option behaves similarly to the
|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.
You cannot use this option with the
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.
Disable specific modules during the account restoration process.
We strongly recommend that only advanced users apply this option. If you incorrectly configure this option, the cPanel account may restore in a broken state.
A valid module name. (For example,
The backup filename must use one of the following formats:
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: