Single cPanel Account Backup through SSH
Single cPanel Account Backup through SSH
If you need to backup a single cPanel account, and don’t want to do it through the web interface of cPanel you can do it through SSH. There is a script in the /scripts directory on cPanel webservers called “pkgacct”
1 ) Login to your server as root via SSH.
2) Type: cd /scripts
3) Type: ./pkgacct username (replace username with the acount username you wish to backup)
4) You will not see something along the lines of this:
Copying Reseller Config…Done
Copying Mail files….Done
Copying proftpd file….Done
Copying www logs…Done
Grabbing mysql dbs…Done
Grabbing mysql privs…Done
Copying mailman lists….Done
Copying mailman archives….Done
Copying homedir….Done
5)There will be a file now in /home called cpmove-username.tar.gz where username is the username specified in step #4.
Download the cpmove-username.tar.gz and save it.
6) Download the cpmove-username.tar.gz and save it.
To restore a cpmove-username.tar.gz
1) Upload cpmove-username.tar.gz to the webserver’s /home directory.
2) Type: /scripts/restorepkg username (replace username with the account username)
3) This will restore the site, and also create the cPanel account.