Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Migration to another datacenter with same hostname

Discussion in 'General Discussion' started by Rogerio, Aug 29, 2018.

Tags:
  1. Rogerio

    Rogerio Well-Known Member

    Joined:
    Sep 26, 2016
    Messages:
    60
    Likes Received:
    8
    Trophy Points:
    8
    Location:
    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.
     
  2. vanessa

    vanessa Well-Known Member PartnerNOC

    Joined:
    Sep 26, 2006
    Messages:
    833
    Likes Received:
    28
    Trophy Points:
    178
    Location:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Rogerio likes this.
  3. cPanelMichael

    cPanelMichael Technical Support Community Manager Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    47,005
    Likes Received:
    2,123
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. Rogerio

    Rogerio Well-Known Member

    Joined:
    Sep 26, 2016
    Messages:
    60
    Likes Received:
    8
    Trophy Points:
    8
    Location:
    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)
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice