How to move from one server to other without downtime?

netlook

Well-Known Member
Mar 25, 2004
334
0
166
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.
 

rpmws

Well-Known Member
Aug 14, 2001
1,797
9
318
back woods of NC, USA
Originally posted by netlook
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.
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.
 

h2oski

Well-Known Member
Dec 12, 2001
68
0
306
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.
 
Last edited:

h2oski

Well-Known Member
Dec 12, 2001
68
0
306
**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