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 migrate cPanel server to another cPanel server

Discussion in 'General Discussion' started by yongki, Apr 13, 2011.

  1. yongki

    yongki Registered

    Joined:
    Apr 13, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    May I Know Step by step to migrate from Cpanel server to another Cpanel server, because we want to change the existing server Cpanel with the new server. I dont want to input one by one database.

    Thank you
     
  2. JeffP.

    JeffP. Well-Known Member

    Joined:
    Sep 28, 2010
    Messages:
    164
    Likes Received:
    9
    Trophy Points:
    18
    Hi yongki,

    To migrate from one cPanel server to another, please do this:

    1. Log into WHM as root on the new cPanel server

    2. Click "Copy multiple accounts/packages from another server"

    3. Fill in the required information and click "Fetch Account List"


    You will then be given the option to choose which accounts and packages to transfer.

    Please let us know if this helps.

    Thanks!
     
  3. yongki

    yongki Registered

    Joined:
    Apr 13, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Is it same with rsync method ?
    And whether the way is done, Can the new cpanel run well like the old cpanel ?
    without reconfiguration (Plug and Play), because we do not want to use the old cpanel server.

    Thank you
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    What precisely is the rsync method you would be using? The WHM > Transfers area isn't using rsync to perform the copy.

    I would not suggest using rsync unless the old server is unstable and you need to quickly get the files off of it before it dies entirely.
     
  5. yongki

    yongki Registered

    Joined:
    Apr 13, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Dear Sir,
    May I ask step by step to a full backup cpanel (pdf)

    Thanks
     
  6. k-planethost

    k-planethost Well-Known Member

    Joined:
    Sep 22, 2009
    Messages:
    199
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    Athens Greece
    /http://www.youtube.com/watch?v=LFvhDS7HcS8
    /http://www.youtube.com/watch?v=o7fVs8mEKvw
     
  7. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    You may also want to refer to our backup documentation, which is available on our site in HTML format. I apologize, but we do not have PDF versions of this documentation.

    Backup
    cPanel Files
     
  8. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    621
    Likes Received:
    6
    Trophy Points:
    18
    Here are some interesting sources:

    http://forums.cpanel.net/f49/cpanel-full-backup-98405.html#post445397


    /http://blog.eukhost.com/webhosting/restoring-cpanel-server-from-crashed-harddisk-or-migrating-cpanel-servers/


    The link(s) above has been disabled, cPanel does not recommend, endorse or support using rsync to transfer files between two servers.
     
    #8 postcd, Aug 24, 2011
    Last edited by a moderator: Aug 24, 2011
  9. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    As Tristan noted, we do not recommend, endorse or support using rsync to transfer files between two servers. The only situation in which this should be considered would be if the old server is unstable and you absolutely need to move the files quickly. In all other cases, the backup methods that we do support should be used.

    Instead of using rsync to copy system configuration files, you can instead copy the cPanel configuration and EasyApache profiles. The following sections of our documentation explain how to do this:

    Advanced Options: Pre-Installation
    Configuring Apache Pre-Installation

    Again, we strongly advise against any method using rsync unless the hard drive in the old server is showing imminent signs of failure. Any other use of rsync can cause more problems than it is intended to solve, because it can and will copy over configurations that will not necessarily work on the new server.
     
  10. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    621
    Likes Received:
    6
    Trophy Points:
    18
    Thanks,

    then please what is the full guide to move cpanel accounts and cpanel configuration, apache config and mysql config + any other important things to a new server? I absolutelly dont understand above two links.

    The accounts transfer is easy, WHM > Transfers > Copy multiple accounts/packages from another server

    But what about easy to follow steps to copy rest of server config?
     
  11. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,451
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Setup the new server normally and then move your accounts to it. This is the safe way to go, IMHO.
     
  12. postcd

    postcd Well-Known Member

    Joined:
    Oct 22, 2010
    Messages:
    621
    Likes Received:
    6
    Trophy Points:
    18
    But what about easy to follow steps to copy rest of server config?
     
  13. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,451
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  14. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    There simply is no simple list of commands that you can copy and paste to "clone" a server or copy an old server's configuration in its entirety to a new one. Copying and pasting rsync commands in an attempt to do this most often causes serious problems, because doing so assumes that the old server's configuration is good and valid. That is a bad assumption to make, and the rsync process will simply copy everything over, bad configurations and all, and cause problems from the beginning on the new server that should be pristine.

    The links I provided in my previous post explain how to copy the EasyApache build profile and most of the cPanel configuration. This can be done successfully. If you copy the EasyApache profile and /var/cpanel/cpanel.config and /etc/wwwacct.conf before installing cPanel, cPanel will install using the EasyApache profile and the settings in cpanel.config and wwwacct.conf.

    You can copy the MySQL configuration, in most cases, by copying /etc/my.cnf from one server to another. This will only work well if the MySQL version is the same on both servers. If at all possible, it is best to make a MySQL dump, using the mysqldump command, of the databases on the old server, copy the resulting files, then import them into MySQL on the new server. This is far preferable to copying the /var/lib/mysql directory or its contents, which can sometimes work but is not advised.

    If you have a hard drive with cPanel installed on it that will not boot, but can be mounted, you can actually use chroot to make that hard drive your environment, and then use cpbackup to make valid, good cPanel backups that way. The only thing this will not do is make backups of the MySQL databases, but you can even work around that by changing the base directory for MySQL in the my.cnf file on the old, bad hard drive. Of course, this does run the risk of copying over bad data if the hard drive has corruption, but it can make good cPanel backups that will restore on the new hard drive.

    The best way to avoid all of these less-than-ideal situations, ultimately, is to use cpbackup to make good backups and store them in a remote location, off the server, so that they will be available to restore if the need ever arises. This will completely avoid the need to try to use rsync, chroot, or any other methods to try to salvage data after a hard drive failure or other disaster.
     
  15. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
  16. dxer

    dxer Well-Known Member

    Joined:
    Sep 9, 2002
    Messages:
    295
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Europe
    I am reviving this thread.
    I am about to switch servers and I would like to know following:

    1. Do I have to set account packages on new server before transfer ?

    2. Server nameservers will be set but what about nameservers for the reseller account.....do I have to do something before transfer ? If yes, what exactly

    3. Further more on reseller transfer, when transferring all accounts from old server, will reseler's accounts and reseller account itself be transferred and set like it was on old server or do I have to do something after transferring reseller, configuring privileges, etc. ?
     
  17. JeffP.

    JeffP. Well-Known Member

    Joined:
    Sep 28, 2010
    Messages:
    164
    Likes Received:
    9
    Trophy Points:
    18
    Hi dxer,

    1) No. The accounts can be successfully copied even if you have not created any packages yet on the cPanel server.

    2) NS records in the accounts' zones should be populated with the entries at WHM >> Basic cPanel & WHM Setup >> [Nameservers]. So, as long as those nameservers are valid, there's nothing more than needs to be done before the transfer.

    3) The reseller structure likely will not be the same on the cPanel server, though I think our migrations scripts developers have been working on that recently. You can always set up an account as a reseller on the cPanel server via WHM >> Reseller Center >> Add Reseller Privileges. You can then use WHM >> Change Ownership of Multiple Accounts to place some accounts under that reseller.

    Please let us know if this information is helpful.

    Thanks!
     
    #17 JeffP., Oct 17, 2012
    Last edited: Oct 22, 2012
  18. dxer

    dxer Well-Known Member

    Joined:
    Sep 9, 2002
    Messages:
    295
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Europe
    I think second and third questions are not understood correctly so I will explain some more

    2. Main server nameservers are set at WHM >> Basic cPanel & WHM Setup >> [Nameservers]. But what about reseller own nameservers, do I have to set them somehow before transfer or transfer will populated reseller how it is on old server. Old server is cPanel/WHM too.

    3. Both servers are cPanel/WHM so when transferring accounts with function "Copy multiple accounts/packages from another server" do I have to do anything after transfer or all reseller account will be marked as specific reseller and reseller account will have all privilieges and settings like on previous server ?

    Further more, is there any concerns about transferring multiple accounts/packages from another server. I mean I remember when I was doing this 5 years ago, some accounts were not transferred (skipped for some reason) so when I switch on new server and some clients account were not transferred......this was big problem. Can this happen again ?

    And this function is called transferring multiple accounts/packages, so will packages be transferred too ?
     
  19. JeffP.

    JeffP. Well-Known Member

    Joined:
    Sep 28, 2010
    Messages:
    164
    Likes Received:
    9
    Trophy Points:
    18

    My apologies for misunderstanding. I assumed that you were migrating from a non cPanel server to cPanel, as that is primarily what this section of the forums is intended for. I overlooked the subject line of the thread which states that these are cPanel to cPanel transfer questions.

    If you a copy a reseller, their nameserver settings should be copied as well. They are stored in this file:

    /var/cpanel/resellers-nameservers

    There is nothing to set up on the new server before copying the accounts in regards to the nameservers of the reseller.

    You should not need to take any extra actions.

    If there are network connectivity issues between the 2 servers while an account is being copied, that could interfere with 1 or more accounts being copied, yes. I am unaware of any other conditions that would lead to accounts not being copied.

    Correct, yes. The necessary package files from /var/cpanel/packages/ will be copied as long as you select them from the "Packages" section found near the top of the page.
     
Loading...

Share This Page