a. How to create a backup of a cPanel Account via SSH?
1. Log-in to the SSH as the Root user.
2. Since it will be a time-consuming task, it is better to run it on screen.
3. Enter the following command string on the command line interface:
/scripts/pkgacct username
The account backup will be created in the current directory you are in. So please try to run the command from a directory in which the partition has enough free space available.
b. How to Restore a cPanel Account via SSH?
Log in to the server via SSH and enter the following command from the directory in which the backup files are located.
/scripts/restorepkg username
If the backup file name is not in the standard cPanel format(eg: cpmove-username.tar.gz), you need to specify the filename/path with the command like below:
/scripts/restorepkg username /home/backupname.tar.gz
If the cPanel account is already created on the server and you are running the restoration later, you might need to use the force option as well.
/scripts/restorepkg --force username /home/backupname.tar.gz