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 move from one server to other without downtime?

Discussion in 'General Discussion' started by netlook, Jun 14, 2004.

  1. netlook

    netlook Well-Known Member
    PartnerNOC

    Joined:
    Mar 25, 2004
    Messages:
    335
    Likes Received:
    0
    Trophy Points:
    16
    I have already one dedicated server in DC1. It is my second server (my first) is in DC2. Because of almost-every-day downtimes in DC2 I want to move this server to DC1.

    But of course, I have almost 300 clinets on server in DC2, and I don't want them to feel that I'm moveing or something. Please get me advice how to do this without any or with small (around 10-15 minutes) downtime?

    The servers in DC1 & DC2 are of course cPanel/WHM 9.4.

    The configuration of all my name servers are:

    I have two name servers - ns1.domain.com and ns2.domain.com pointing to DC2 IP's. The secont two - ns3.domain.com and ns4.domain.com are pointing to DC1 but another server than I want to move on. I have two A records of ns3.domain.com and ns4.domain.com in my DC2 server pointing to ns3.domain.com / ns4.domain.com on DC1 (I hope you will understand).

    Please give me advice how to do this whole moving.
     
  2. rpmws

    rpmws Well-Known Member

    Joined:
    Aug 14, 2001
    Messages:
    1,824
    Likes Received:
    5
    Trophy Points:
    38
    Location:
    back woods of NC, USA
    mod your dns zones for a super fast refresh time. waith 24 hours. as you copy accounts using cpanel copy, change the dns zone on the first server to reflect the new IP address. It will then point traffic to new server. Once you are satisified that all has moved over change the namserver IP's to IPs on the new box. At this point it won't make a traffic change becuase that was done earlier with the zone update. Once the NIC ns IPs and changed you should be able to shut down server1. Don't forget your certs and make sure any special root cron jobs went over. I liek to watch mysql dbs as well.
     
  3. h2oski

    h2oski Well-Known Member

    Joined:
    Dec 12, 2001
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    I just did this over the weekend.

    300+ accounts moved with zero downtime.
    exactly as rpmws said, the best way is to update each dns zone as the accounts were transfered.

    The key was to let the dns cluster system update the dns zones on the old server for me :)

    As rpmws said, change the TTL on each dns zone
    cd /var/named
    perl -pi.bak -e "s/14400/900/g" *.db
    /etc/rc.d/init.d/named restart

    then setup clustering:
    add the old server to the new server in the cluster section and select 'Synchronize Changes'.
    (it will give you a failure message when you add it to the cluster - don't worry everything is fine)

    After 24 hours do the mass transfer in WHM.
    Now as the accounts are created on the new server the dns zones will be updated one-by-one on the old server.

    the rest is exactly as rpmws posted.
     
    #3 h2oski, Jun 15, 2004
    Last edited: Jun 15, 2004
  4. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    You mean as rpmws said. ;)
     
  5. h2oski

    h2oski Well-Known Member

    Joined:
    Dec 12, 2001
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    :eek:
     
  6. h2oski

    h2oski Well-Known Member

    Joined:
    Dec 12, 2001
    Messages:
    68
    Likes Received:
    0
    Trophy Points:
    6
    **Important

    when you change the A record for your hostname to point to the new server remove the old server from the cluster.

    I believe failing to remove the server from the cluster was causing my server to crash
     
Loading...

Share This Page