How to backup/restore a single cPanel account via SSH
cPanel allows you to backup and restore cPanel accounts with shell commands. We will show in this post the commands you need to use.
To backup a single cPanel account:
1. Login on your server as root via SSH
2. Run the command:
/scripts/pkgacct user
By default, the backup file (cpmove-user.tar.gz) will be created in the /home directory.
To restore a single cPanel account backup/cpmove file:
1. Login on your server as root via SSH
2. Run the command:
/scripts/restorepkg user
or
/scripts/restorepkg path-to-backup-file
To run the command with the user value, you must be in the same directory with the archive file.
You can also use the WHM interface to restore backups.
For more details about the pkgacct and restorepkg scripts use:
/scripts/pkgacct --help
and
/scripts/restorepkg --help