You can use the
/usr/local/cpanel/scripts/restorepkg script to restore a cPanel account from a backup file.
You can also restore a cPanel account from a backup file in WHM's Restore a Full Backup cpmove File interface (WHM >> Home >> Backup >> Restore a Full Backup/cpmove File).
To use the
/usr/local/cpanel/scripts/restorepkg script, run the following command as the
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 operates similarly to the
|Restore reseller privileges.||None.|
Restore the account to a certain IP address.
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 contains 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 option, 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:
- Adds the package to the
- Starts the restoration process.
- Uses the
tailcommand to output the log file's contents after the restoration process begins.
For example, the following command uses the unrestricted restore method to restore the
192.0.2.169 IP address: