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
/usr/local/cpanel/scripts/restorepkg [arguments] [input] [filename]
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.
|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.
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.
Disable specific modules during the account restoration process.
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:
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:
/usr/local/cpanel/scripts/restorepkg --ip=192.0.2.169 cpmove-testaccount.tar.gz