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.

WHM Migration

Discussion in 'General Discussion' started by Magician, Apr 15, 2010.

  1. Magician

    Magician Member

    Joined:
    Sep 6, 2008
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Hey All.

    I am in a position where I need to transfer all my cPanel accounts (Around 50 accounts) from Server A to Server B. I have full root to both.

    The problem is, We cannot have any downtime or any databases going out of sync. We run several ecommerce sites and making sure that all the databases are kept uptodate is essential.

    Looking for advice on a strategy to move all the accounts and keep the databases in sync. Anyone done it, what was your plan?
     
  2. WiredTree Joe

    WiredTree Joe Well-Known Member
    PartnerNOC

    Joined:
    Dec 13, 2006
    Messages:
    68
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Chicago, IL
    This is not the best method for zero downtime, but since this feature was added not to long a go, I am throwing it out there. The WHM bulk account copy feature has the "Express Transfer" feature which can help speed up account transfers between cPanel based servers.

    Copy Multiple Accounts/Packages from Another Server

    You can speed things up if you lower the TTLs for every domain name down to 300 seconds the night before on your old server and it will speed up propagation time even more.
     
  3. Magician

    Magician Member

    Joined:
    Sep 6, 2008
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the reply!

    I tried using the Express transfer feature on a few of my personal sites on the server and get the following

    Anyone got any idea why id doesn't do a straight forward?
     
  4. WiredTree Joe

    WiredTree Joe Well-Known Member
    PartnerNOC

    Joined:
    Dec 13, 2006
    Messages:
    68
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Chicago, IL
    It is most likely due to the fact that the DNS is cached at your location/ISP. If you lower your TTLs down to 300 seconds, it will speed things up in most cases.
     
  5. Magician

    Magician Member

    Joined:
    Sep 6, 2008
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Okay, is there any easy way to change it for all domains in one go?
     
  6. Magician

    Magician Member

    Joined:
    Sep 6, 2008
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    I am not sure how useful this feature is if it doesn't forward the traffic automatically?

    Do you have any solution for doing this?
     
  7. WiredTree Joe

    WiredTree Joe Well-Known Member
    PartnerNOC

    Joined:
    Dec 13, 2006
    Messages:
    68
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Chicago, IL
    The feature doesn't forward traffic. It changes the DNS zone to reflect the new IP address on the new server. The domain still has to go through DNS propagation as a result. To speed up DNS propagation, you can lower the TTLs on the DNS zone to a low value (I use 300 seconds which is 5min). If you are running your own namesevers, you can update the TTLs in the WHM under Main >> DNS Functions >> Edit DNS Zone and then wait ~24hr for the TTL change to kick in. Once you do that and then transfer the site with the Express Transfer feature, you will see DNS propagate much faster to the new IP address and thus a lower amount of "downtime" occurs.

    Hope that points you in the right direction.
     
  8. Magician

    Magician Member

    Joined:
    Sep 6, 2008
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Is it possible to have WHM automatically forward all traffic from server A to server B - Zero Down time and perfect MySQL syncing are essential.
     
  9. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    You can eliminate downtime by running both servers during the transfer and updating the DNS zones on the old server with the new server IPs.

    However, in regard to what you said about MySQL (and unmentioned email also), you will have some visitors connecting to the old server and some visitors connecting to the new server during the first 24 hours and there is little you can do about that without overhauling your server configuration entirely such as setting up MySQL on a 3rd server or using a MySQL cluster type configuration which can be complicated to setup and can cause the very downtime during setup you are trying to avoid.

    The best method is really what I said where you copy everything over to the new server, update the DNS zones on the old server to point to the new server, and then switch the actual DNS servers which will give you the quickest and most seamless transfer.

    As far as those few visitors still connecting to the old server during this brief period, your options are either do a final copy and merge and data again from the old server after everything finishes transferring or turn off the original sites so that those still connecting to the old server know that they are connecting to the wrong server.
     
  10. Brandonm

    Brandonm Active Member

    Joined:
    Aug 31, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Best method that I know of is this:

    If you are hosting the DNS on your machines then setup a cluster between the old and the new. Have them sync changes. And then use the Express Transfer option for each account. Works like a charm. :D

    Edit: After all accounts are transferred I disable MySQL, FTP, Cpanel, Apache.
     
  11. Parcye

    Parcye Well-Known Member

    Joined:
    May 19, 2004
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Eindhoven
    How did this work out for you? I am planning to do almost the same with a few days.

    I first will have to find out how to host my own DNS... did that back in 2004 but can't find that tut.
     
  12. huafeihua116

    huafeihua116 Registered

    Joined:
    Apr 12, 2010
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Thank you!
     
  13. fmurga

    fmurga Member

    Joined:
    Aug 20, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1


    Pardon me for bringing this threat to life again.

    In order for this to work, I need to change only TTL for A records on all the accounts on server, right?

    I'm used to having my servers managed and have little experience with this.

    Detailed info on this subject would be greatly appreciated.
     
    #13 fmurga, Aug 21, 2010
    Last edited: Aug 21, 2010
  14. larry2148

    larry2148 Member

    Joined:
    Aug 16, 2006
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    The TTL tells ISP's and your computer how long to cache that value for, You can set it to something extremely low, like 30 or even 5 to make sure that as soon as you make the change of IP address people will be updated instead of taking a few hours as is default most of the time.

    You will need to change the TTL for all sites that you're going to change the IP address of. Once you change it to very low you will need to again wait a few hours until your ttl change will take effect. At that point once you change the IP on your sites they should all start pointing to the new server within a few minutes or seconds depending on your TTL.

    PS, after everything has been changed to the new server and is working great make sure to put your TTL values back up to something higher like 3600.
     
    #14 larry2148, Aug 21, 2010
    Last edited: Aug 21, 2010
  15. fmurga

    fmurga Member

    Joined:
    Aug 20, 2008
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Thanks, but your comment did not answer my question:

    In order for this to work, I need to change only TTL for A records on all the accounts on server, right?

    I see that my A records have a TTL of 15 minutes now, but my DNSs have 24 hours.

    Should I change these too for all accounts?
     
Loading...

Share This Page