Warning: mysqli_num_fields() expects parameter 1 to be mysqli_result, boolean given in /home/cikul/public_html/dhika/wp-includes/wp-db.php on line 3021
Dhika Cikul » Blog Archive » Backup cpanel account from SSH

Backup cpanel account from SSH

Posted by cikul | Posted in Linux | Posted on 12-02-2009-05-2008

5

Sometimes there is a need to backup a CPanel account without logging into CPanel. we can backed up cpanel account via SSH.

pkgacct

from the /scripts folder on your server.

1. Log into your server by using SSH

* Change to the root user

su – root

(See our server security tutorial for more information on this login procedure)

2. Change directories to the script directory by executing the following command: cd /scripts

3. Execute the CPanel script for the account backup:

./pkgacct username

(replace the username with the actual acount username that you are going to backup)

The screen output will look similar to this:

Copying domain 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. The backup file will be placed in the users home directory.

You can now access the file and copy or move it to your backup drive or download it via ftp.

How to restore a Domain Account via SSH

1. Upload or copy the backup file (Example File Name: cpmove-joeuser.tar.gz) to the domain account Home directory via FTP.

2. Log into your server by using SSH

* Change to the root user

su – root

(See our server security tutorial for more information on this login procedure)

3. Change directories to the script directory by executing the following command: cd /scripts

4. Execute the appropriate CPanel script for the account restore:

/scripts/restorepkg username

(replace username with the domain account username)

(make sure that the file name matches the necessary naming convention – follow the naming scheme seen in our example)

This will restore the domain account from the backup, as well as it will create the CPanel account. We have not tried to do a restore on top of an existing CPanel account yet, but we have heard that this should work just fine. Please test accordingly.

Share and Enjoy

Comments posted (5)

Thank’s for the advice!
I had a big problem with Grabbing mysql privs last week…
Gael

Thanks

Thank you for your information, great post !

The information your site will be very usefull, thank you.

Excellent post very interesting, thanks.

Write a comment

*