The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How To: Transfer Accounts from one server to another!

Discussion in 'General Discussion' started by HelloAdam, Nov 21, 2006.

  1. HelloAdam

    HelloAdam Well-Known Member

    Joined:
    Nov 6, 2005
    Messages:
    145
    Likes Received:
    0
    Trophy Points:
    16
    Hey,

    Note to mods: Maybe you can sticky this thread?


    -----
    I have seen many requests on people trying to transfer accounts from one server to another. In this tutorial or how to guide, you will need root access via SSH on both servers. So lets get started!


    Steps on backing up accounts
    -------------------------------------

    This guide is guessing that you have already made backups of each account you want to transfer to the new server by running the command

    Code:
    /scripts/cpbackup
    
    in SSH. Depending on your server specs and how many accounts you want to transfer this could take from 5 min to 6 hours. I'm also guessing that you have enabled backups in root WHM and have setup a folder to backup your file. I'm also guessing that you DO NOT, have Incremental backup enabled. Incremental backups do not put each account in its own .tar.gz file. IF you have Incremental backups enabled please disable them by going into root WHM, Main > Backup > Configure Backup. Once you have all backups done, lets really really start transfering accounts.

    This guide I'll be using the folder /backup/ to where my files all my accounts have been backup to. (The full path will look something like /backups/cpbackup/daily)

    Lets get started!!!

    ===
    1) In SSH cd to backup folder

    Code:
    root@server [/]# cd /backup/cpbackup/
    
    2) Now this is not where your files are located, but rather in a folder called daily, weekly or monthly. Your current backups should be in daily (daily folder is /backups/cpbackup/daily)

    3) We are now going to tar the whole daily folder

    Code:
    root@server [/backups/cpbackup]# tar -zcvf backup_daily_folder.tar.gz daily
    
    (Depending on how many accounts or your sever specs this could take anywhere from 5 min to 6 hours, your server may be "laggy" during this time)

    4) Once you have that done you should see a file named backup_daily_folder.tar.gz in /backups/cpbackup . We are now going to move this file to your new server!

    Code:
    root@server [/backups/cpbackup]# scp -c arcfour backup_daily_folder.tar.gz root@NEWSERVERIP:/home/
    
    After you enter this, you will be asked for root's password on your NEW server and hit enter when your done. This will then transfer the file to the new server.

    Once your done, type

    Code:
    root@server [/backups/cpbackup]# rm -rf backup_daily_folder.tar.gz
    
    (removes the tar file on your old server)

    ON YOUR NEW SERVER

    5) Go to your /home/ folder

    Code:
    root@NEWserver [/]# cd /home/
    
    and tpye this

    Code:
    root@NEWserver [/home]# tar -xvfz backup_daily_folder.tar.gz
    
    (This will unpack the tar)

    Once again lets delete the tar file

    Code:
    root@NEWserver [/home]# rm -rf backup_daily_folder.tar.gz
    
    Now in your new server logon to root WHM and click on the

    Backup > Restore a Full Backup/cpmove file

    and use the information on that screen to use the accounts on the server.

    If you have any questions post them below!

    From,
    Adam
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,577
    Likes Received:
    40
    Trophy Points:
    48
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    use whm

    Transfers
    Copy an account from another server
    Copy an account from another server with account password
    Copy multiple accounts from another server
     
  3. HelloAdam

    HelloAdam Well-Known Member

    Joined:
    Nov 6, 2005
    Messages:
    145
    Likes Received:
    0
    Trophy Points:
    16
    Hey,

    Or you could use this method. HOW ever, when trasfering large accounts (anything over 300mb is my limit) you have a higher chance of something going wrong, from a lost packet from old server to new server. This process is longer since it takes each account and extracts them one by one, instead of downloading all the accounts and extracting all the accounts together. Hence the reson the first method is the best...

    From,
    Adam
     
  4. zoelsepur

    zoelsepur Registered

    Joined:
    Jan 24, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    i need help to ransfer

    i'm reseller hosting who use whm, how can i transfer my client to my server ?
    in my whm i don't see trasfer link in main. thx
     
  5. Chriz1977

    Chriz1977 Well-Known Member

    Joined:
    Sep 18, 2006
    Messages:
    191
    Likes Received:
    0
    Trophy Points:
    16
    Hi

    This is how I do it :

    1. Log into the server that your copying the accounts from via SSH

    2. type '/scripts/pkgacct [username]'

    3. type 'scp cpmove-[username].tar.gz root@[NEWSERVERIP]:/home/'

    4. Log into the [NEWSERVER] via SSH

    5. type '/scripts/restorepkg [username]'

    DONE!
     
  6. HelloAdam

    HelloAdam Well-Known Member

    Joined:
    Nov 6, 2005
    Messages:
    145
    Likes Received:
    0
    Trophy Points:
    16
    Contact your host, as they have root access...

    From,
    Adam
     
  7. ekhwan

    ekhwan Active Member

    Joined:
    Aug 12, 2006
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    Can this be done with multiple accounts? Can you provide a similar step by step guide with scripts please.

    Thanks a lot
     
  8. timbernet

    timbernet Registered

    Joined:
    Mar 5, 2005
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Will this method copy MySQL databases and Addon domains as well?

    I have seen mention that the WHM method of transfer doesn't copy those two (maybe it does now, but I guess it didn't use to)

    Thanks!
     
  9. AngleOfDeath

    AngleOfDeath Member

    Joined:
    Jun 9, 2007
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    My friend was a reseller of a server , and he had many clients
    He used whm to control them
    I have a dedicated server
    I want him tobe a reseller in my server
    and all his clients will be transfered to my server
    So, can I use above guide??


    and when I do them, they will create a tar file in my server???
    and they will stay in /home???
    thanks sir
     
  10. AngleOfDeath

    AngleOfDeath Member

    Joined:
    Jun 9, 2007
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    And do I create a reseller in whm first?
     
  11. ddeans

    ddeans Well-Known Member

    Joined:
    Feb 13, 2004
    Messages:
    296
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Maryland
    You can, but either way you are going to have to change ownership of the accounts.
     
  12. ddeans

    ddeans Well-Known Member

    Joined:
    Feb 13, 2004
    Messages:
    296
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Maryland
    I use the WHM transfer method a lot and it copies the databases and add on domains for me.
     
  13. AngleOfDeath

    AngleOfDeath Member

    Joined:
    Jun 9, 2007
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    what does it mean?
    how can i change ownership of the accounts?
     
  14. ddeans

    ddeans Well-Known Member

    Joined:
    Feb 13, 2004
    Messages:
    296
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Maryland
    In WHM -> Account Information -> List Accounts -> The very last column says who the owner is, click the edit icon next to them and select who the new owner should be.
     
  15. markhard

    markhard Well-Known Member

    Joined:
    Apr 22, 2004
    Messages:
    250
    Likes Received:
    0
    Trophy Points:
    16
    you can only use the guide above only if you have root access to the old server. if your friend only a reseller, which don't have root access, all i know is to transfer accounts using cpanel full backup feature or from your server's WHM "copy account using account password" which is a boring thing to do if you have a lot of accounts :(
     
  16. ebinfo

    ebinfo Active Member

    Joined:
    Oct 5, 2005
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    tried this method and worked like a charm for an account of about 3 gb :)
     
  17. apex2010

    apex2010 Registered

    Joined:
    Mar 28, 2010
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Backup help

    Hello gurus, I have a bit complex scenario. Please help

    I have a WHM reseller account with No SSH & root with over 12 GB data and 150 accounts. Now I got a VPS with WHM and root access.

    I want to move all my 150 accounts from Server A to Server B (with SSH).

    I need help and guidance by which I can get the job done with least efforts. I have R1soft backup facility on my Server A and root access on server B.

    If there is any way I can log on to my new server and run a script to get accounts from FTP access of the old server to CP backup restore (complete package & PW) at new server.

    Please help
     
  18. mohit

    mohit Well-Known Member

    Joined:
    Jul 12, 2005
    Messages:
    553
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Sticky On Internet

    Use copy multiple accounts from another server option in WHM of new server.
    you can search more details on this on this forum, i think not less than 100 threads about the same.
     
  19. ingenialtda.com

    Joined:
    Dec 26, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Bolivia - Santa Cruz
    My old server does not allow me to copy accounts to the new server. What could be the problem.
     
  20. columbusgeek

    columbusgeek Member

    Joined:
    Nov 30, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1

    Brilliant and perfect advice. Thanks so much.
     
Loading...

Share This Page