Single cPanel Account Backup via 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.

6. Download the cpmove-username.tar.gz and save it.
(You can use your FTP software to login to the server and download the file)

Ho To restore a cpmove-username.tar.gz

1. Upload cpmove-username.tar.gz to the webserver’s /home directory.
(You can use your FTP software to login to the server and upload the file)

2. Type: /scripts/restorepkg username
(replace username with the account username)

This will restore the site, and also create the cPanel account.

Facebook Comments

More Stuff

Linux VPS speed test Need to test the read and write speed of your VPS , checking your I/O speed ?try this : dd if=/dev/zero of=test bs=64k count=512 oflag=dsync
8 Linux ‘Parted’ Commands to Create, Resize and Rescue Disk Partit... Parted is a famous command line tool that allows you to easily manage hard disk partitions. It can help you add, delete, shrink and extend disk partit...
Limit CPU Usage of a Process in Linux with CPULimit Tool In an earlier post, we’ve explained CPUTool for limiting and controlling CPU utilization of any process in Linux. It allows a system administrator to ...
Here’s How Much Bots Drive Conversation During News Events Last week, as thousands of Central American migrants made their way northward through Mexico, walking a treacherous route toward the US border, talk o...
Spread the love