Thử thêm cái coi lào
Jun 24

Backup & Restore a cPanel Account via SSH

Performing tasks via SSH is a lot easier most of the time than having to  waste time logging in through that big fat clunky web interface and  messing around with all the noob friendly half arsed validation  procedures, etc…

Here is how to package up and restore a cPanel  account from the command line.

Step 1.  Login to the server via  SSH:

    
Trích dẫn
root@server [~]#


Step 2.  Type the following  command (replace USERNAME with the accounts username):

    
Trích dẫn
root@server [~]# /scripts/pkgacct USERNAME


You should then see something  similar to the following on your 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

Now a file named something like  “cpmove-USERNAME.tar.gz” will be in the /home/ directory.

You can  then move this file by either downloading it via FTP from an account  you have moved the .tar.gz into or SCP it to another server.

Step  3.  To restore the account, type the following replacing USERNAME with  your accounts username obviously):

    
Trích dẫn
root@server[~]#: /scripts/restorepkg USERNAME


Thats it!  The account has now been  restored.