Migration to another datacenter with same hostname

Rogerio

Well-Known Member
Sep 26, 2016
78
15
8
Sao Paulo, Brazil
cPanel Access Level
Root Administrator
Hello,

I want to move my server to another company/datacenter but keeping the same hostname to be transparent to the users and avoid change each domain DNSs, that are configured as ns1.myhostname.mydomain.com and ns2.myhostname.mydomain.com.

Since the server has ~100 accounts, I want to move only 5 accounts to test for one month, and then move others. In these 5 accounts, I'll change DNS manually on the registars.

My question is: since the server will be configured with the same hostname, and myhostname.mydomain.com still points to the actual datacenter, I'll have problem with email delivery, right? And the new server has no PTR to the hostname yet.

Any idea how to do this? Any ideas other problems that I can have?

Thanks.
 

vanessa

Well-Known Member
PartnerNOC
Sep 26, 2006
833
28
178
Virginia Beach, VA
cPanel Access Level
DataCenter Provider
So, what I would do is:

1) Set the zone TTLs down to 5 minutes at least a day in advance
2) Set up your nameservers on the new server and re-point them with your domain registrar, then cluster your old server to your new server. This means your new server will start serving the zones while the domains still point to the old server
3) Use the WHM migration utility to move the accounts over. The DNS will automatically update as long as the domains are using ns1.myhostname.com, etc.
4) Update the A-record for your server's hostname to point to the new server
5) Set the zone TTLs back to 4 hours, if you want.
 
  • Like
Reactions: Rogerio

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,234
363
cPanel Access Level
DataCenter Provider
Twitter
Since the server has ~100 accounts, I want to move only 5 accounts to test for one month, and then move others. In these 5 accounts, I'll change DNS manually on the registars.
Hello @Rogerio,

The previous post is a good plan of action.

However, note you're going to want to setup a different hostname for the new server if you plan to run both servers at the same time (even if it's just for a month). You could use something like "server2.host.tld" on the new server for the first month, and then switch it over to the original hostname when you are ready to shut down the source server.

Thank you.
 

Rogerio

Well-Known Member
Sep 26, 2016
78
15
8
Sao Paulo, Brazil
cPanel Access Level
Root Administrator
Hello Vanessa and Michael, thank you for the ideas.

I had problems in the past changing the server's hostname in cPanel, specially with Munin, that I use a lot. Since this new server will be our main server, I prefer keep the settings in a "final situation" and avoid problems when the server goes to production mode.

But Vanessa idea gave me another idea. Move the test accounts to the new server, using Transfer tool, and just change the old server DNS zones to point to the new IP. This will avoid change the hostname's IP and the hostnames that I use to DNS registers. After the tests, I'll move everything and just change the hostname's IP, and the new server will respond automatically in the same IP.

My main concern now is, during the tests, emails being refused because were sent from the new server, with "HELO hostname" but the hostname is still in the other IP... I'll need to test...

Thanks
(sorry for my limited english)