April 27th, 2007

How to Move Accounts From One cPanel Server To Another

This tutorial explains a simple, straightforward method for migrating cPanel accounts from one server to another. You can use this method to transfer accounts from an old server to a new one, help customers from another host move to your host, etc. This does not even require root access on one end of the migration. Basically, this is a more reliable method than the "Transfer Account from another Server" tool in WHM, which rarely works.

Requirements:
- cPanel on both servers
- WHM access on the new server (one that the accounts are being moved to)
- root access on the new server

Definitions
The server you are transferring the accounts from = "old server"
The server you are transferring the accounts to = "new server"

Instructions
1. Log into WHM of your new server and create a new account called "restore", or anything you like for that matter. Remember the FTP address, username ('restore', in this example), and account password. We will need these for later.

2. Log into the cPanel account you are wanting to transfer on the old server.

3. Click on "Backup >> Generate/Download a Full Backup".

4. Once here, select the backup destination to be "Remote FTP Server".

5. Enter your email address for verification, followed by all of the FTP account information for "restore", which we created on the new server.

-Remote Server: new server's address
-Remote User: restore
-Remote Password: restore's password
-Port: 21

Then, click "Generate Backup". This may take some time to backup the files, depending on how large the account is. You should receive an email provided in the above info once it is complete.

6. Now, log into SSH on your new server.

7. Type in the following commands:

cd /home/restore/public_html

ls

After running the list command above (ls), you should see the tar file of the account on the old server. This means that you have successfully sent the file via FTP to your new server.

8. Now move the tar file to your new server's /home directory with the following command:

mv tar_file_name /home

9. Now, log into WHM on your new server and navigate to "Backup >> Restore a Full Backup/cpmove file"

Once here, you should see the old account's username under "Possible cpmove archives found:".
If you do not, log back into SSH and be sure that the account's tar file has been moved into /home.

10. Type in the account name in the text field in WHM, which is proceeded by "Enter the username for the account you wish to restore:".

11. Click "Restore".

12. Repeat process for additional accounts.

18 Responses to ' How to Move Accounts From One cPanel Server To Another '

Subscribe to comments with RSS or TrackBack to ' How to Move Accounts From One cPanel Server To Another '.

  1. Dan said,

    on May 17th, 2007 at 1:21 pm

    Can you tell me how to "log into SSH on your new server"

  2. Justin Cook said,

    on May 17th, 2007 at 1:25 pm

    You can use a tool like WinSCP, it's free

  3. thilong said,

    on July 30th, 2007 at 5:10 pm

    I can't login into SSH,
    Can tou show me the way how to migrate one account (or many account or one reseller accoount) to another acccount ?

    Thank you !

  4. Justin Cook said,

    on July 31st, 2007 at 7:16 am

    If you can't login to SSH you may need to find another option - so you'll need to contact your host. Let me know what you find out!

  5. Keith said,

    on August 29th, 2007 at 12:34 pm

    Hi Justin,

    Thanks for the information above. But it seems that I continuously receive an error that says the Account Creation Failed…that username is taken. I also attempted to –force the restore and received the same error message.

    Any ideas what I am doing wrong?

    Thanks

  6. Justin Cook said,

    on September 4th, 2007 at 9:23 am

    Well are you trying to upload files for which the username is already taken? If you've followed all the steps directly and it's not working, I'd contact your host.

  7. Wes said,

    on October 23rd, 2007 at 1:42 pm

    Hey Justin,

    Thank you for the information above, do these steps grab all of their e-mails sitting on the old server as well?

    Cheers,

    Wes

  8. Justin Cook said,

    on October 24th, 2007 at 11:12 am

    Wes,
    yes, as long as the emails are still on the server, they should be moved as well

  9. rakesh said,

    on October 29th, 2007 at 2:17 am

    please tell me how to move a text file from one server to another by using a config file.

  10. Dillon said,

    on December 5th, 2007 at 7:33 pm

    I have logged into WHM on my new server but I cant find the option "Backup >> Restore a Full Backup/cpmove file". Is it in WHM or Cpenal?

  11. Justin Cook said,

    on December 6th, 2007 at 10:33 pm

    Do you not have a dedicated server? Maybe your host has disabled that feature…

  12. Henry said,

    on December 28th, 2007 at 2:35 pm

    i do backup and receive in email:

    Can't call method "login" on an undefined value at /usr/local/cpanel/bin/ftpput line 28.

    any idea? thanks

  13. zall said,

    on January 24th, 2008 at 5:33 am

    Thanks you for your tips. It was working perfectly.
    But I still got problem with mysql database.
    When I moving to the new server, some website of my clients cannot connect to database.
    Can some body help me regarding this problem?

    Regards,

    Afrizal

  14. Mike said,

    on January 26th, 2008 at 2:54 pm

    How do you move the backup to the /home directory, what are the commands for that? Every tutorial I have found says to move it, but none say how to move it!

  15. Mike said,

    on January 26th, 2008 at 4:36 pm

    NM I see it. I guess I'm blind, dumb, or both! Not sure I missed that part of the tutorial!

    Thanks!

  16. Ashoka said,

    on February 3rd, 2008 at 7:17 am

    what happen if mysql server versions were different ?

    is it give bugs?

  17. mohit said,

    on April 5th, 2008 at 7:37 am

    I would do it this way.

    login to SSH
    run /scripts/pkgacct username
    (replace username with the cpanel username you wish to move)
    it will create the tar.gz of the complete account and place it on your /home/
    then transfer the tar file to the new server "/home" and then use whm or SSH to restore it. once this is done, I'll login to old server's WHM and edit DNS zone for this moved account and change the IP to the NEW ones and change the Nameservers to the new one, change the TTL (time to live) value from 14400 to 3600 seconds and save.

    Allow it 30 mins and then update the nameservers from the Domain registrar end. This way there shouldn't be any noticable downtime in most cases.

  18. Greig said,

    on May 18th, 2008 at 9:09 am

    Hi,

    thanks for the tutorial,

    How would i transfer multiple WHM accounts,plus the cpanels within the WHMs to a new server.

    Thansk

Leave a reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image