A complete guide on cpanel account transfer from one server to another

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    A complete guide on cpanel account transfer from one server to another

    Today i will describe how to transfer CPanel accounts from one server to another.
    Lets consider we have two servers A and B. Server A is the old server with two accounts and Server B is new server to which we will transfer accounts.

    Server A = 192.168.0.1

    Server B = 172.20.0.1


    We will Transfer using Shell (Command Line)
    SSH your Server A using putty from windows and command line from linux.

    ssh 192.168.0.1

    Now first of all we will create full backup to transfer and all the backups created are placed under /home directory.

    1.1 Create One Account Backup

    If you wish to backup single account, then execute following command

    Code:
    /scripts/pkgacct cpaneluser
    you will find corresponding backup in /home directory named cpmove-cpaneluser*.tar.gz

    1.2 Create all Accounts Backup
    To create all accounts backup on your server, execute following command

    Code:
    for i in `ls /var/cpanel/users`;do /scripts/pkgacct $i ; done
    again you will find all accounts backup under /home named cpmove-cpaneluser*.tar.gz

    1.3 SCP Backups to New Server
    After creating backup you have to transfer all accounts backup to your new server i.e Server B using SCP.

    Code:
    scp cpmove-* root@172.120.0.1:/home
    Besure all backups should move to /home directory of new server.

    If you have done all accounts backup then you should have to move /var/cpanel/users file for restore on new server i.e Server B in /home directory with name user.txt

    Code:
    scp /var/cpanel/users root@172.120.0.1:/home/user.txt
    1.4 Restore Backup
    To restore single account backup execute following command.

    Code:
    /scripts/restorepkg cpaneluser
    where cpaneluser is of old server and can be found on backup filename after cpmove. i.e

    cpmove-cpaneluser*.tar.gz

    To restore all accounts

    Code:
    for i in `ls /var/cpanel/users`;do /scripts/restorepkg $i ; done
    Now you can List Account in WHM to see all accounts are transferred successfully to your new server and you can login to cpanel accounts of user using same Cpanel user / pass as old server.
    Last edited by Sanju Kr; 17.11.12, 18:56.

    WWW.9XHOST.NET
Working...
X