Previous Post: WHM Scripts
Now we’re going to start looking into some of those SSH commands. Today we’ll be going over the commands pkgacct and restorepkg.
Backing up and restoring cPanel account’s is, in my opinion, faster by using the command line as you don’t have to wait for a sometimes sluggish web interface to load.
Let’s get started then, shall we?
1. Login to your server as root via SSH.
root@lolwut [~]#
2. Type: /scripts/pkgacct username (replace username with the acount username you wish to backup)
root@lolwut [~]# /scripts/pkgacct clayton
3. Now you’ll (hopefully) see something like this on your SSH screen:
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
4. There should now be a file in that users /home/ directory named “cpmove-username.tar.gz” where “username” is the username you specified in Step #3.
5. Download the cpmove-username.tar.gz and save it. (You can use your FTP software to login to the server and download the file)
Now we’re going to restore the backup we just made.
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.
Well, its nice, but you can alternatively use the Backup feature from the cPanel, because in most hosting accounts, SSH Access is not granted, so it’ll be difficult for users to restore account via SSH xD
===========
Message to site admin :
Hey, nice site. I couldn’t find a way to contact you, so, I have to comment on a topic. I own a tutorial blog and was willing to do Link Exchange with you. My site gets around 40-50 Unique Visitors per day and that too 30 from Google, so email me if you wanna do link exchange with me.
btw, my mail is : shashankbadgamer[at]gmail.com