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.

Transfer of server - name servers - hosts - DNS - to a new one

Discussion in 'Bind / DNS / Nameserver Issues' started by Datcrack, Sep 10, 2009.

  1. Datcrack

    Datcrack Well-Known Member

    Joined:
    Dec 31, 2006
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Istanbul / TURKEY
    cPanel Access Level:
    Root Administrator
    Once we copy the accounts to the new server, we need to change the name server ip's which takes about 24 to 48 hours for a %95 percent change. How can we do this right away. Its a real problem for forums and such dynamic sites. As you users go between the old server and the new. Whats the solution ? Maybe directing all dns requests on the old server to the new server ?

    Anybody got any ideas ?
     
  2. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Use the Express Transfer feature in the Multiple Account copy tool. This will do exactly what you are requesting.
     
  3. Datcrack

    Datcrack Well-Known Member

    Joined:
    Dec 31, 2006
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Istanbul / TURKEY
    cPanel Access Level:
    Root Administrator
    waow.. really cool feature. And I was wondering what express transfer was...

    thanks.
     
  4. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Actually the change on the name servers is instantaneous! ;)

    (Most people don't realize that!)

    The perception it takes several days actually lies in the fact that many ISPs where visitors have visited your sites and computers that visit you frequently will have the old IP address stuck in it's routing cache leftover from the last visit those people made to the domains on your server that (unless disabled) will use the cache instead of pulling live DNS resolution information for your domains. During this period, new visitors will get the correct IP information and go to the new server while past visitors and subsequently account owners will still try to go to the old IP address because their computers don't know to pull live resolution updates until the cach expires off and new data is pulled.

    This means that for a small period, some people will go to the new server while others will go to the old server by mistake which means that the solution for a seamless transfer should be blatantly obvious ...

    First advise clients that it wouldn't be wise to make site updates during the transfer period and try to minimize site changes as much as possible.

    When transferring over to a new server, overlap at least 3 days where you leave all the accounts on the old server AFTER they have been transferred to the new server. BOTH update the DNS server IPs (AND) also update the IPs in the zone files left in the old server to point to the new server. This will maximize how fast people get the new IP addresses.

    For those who have computers running off of old routing cache, they'll still connect to the old server for a little while but since you left the original accounts in place for a couple of days, they will still see the web sites without any interruption.

    Once you have given a reasonable amount of overlap time (about 3 days), re-transfer the mail folders on each account from the old server to pickup any email messages that may have also gotten misguided to the old server as the last thing you do and then it should be safe to go ahead and delete the original accounts since everyone should be pointing to the new server by this time (you'll notice Apache no longer has any significant network traffic)

    Meanwhile, during the transfer period, this is not a requirement but you can optionally setup the new server to temporarily allow network connections to the MySQL server and program your old server to route all database queries over to the new server IP address. If you do this then anyone still connecting to dynamic sites on the old server during the transfer period will keep updated and in sync with the new server for sites that are dynamic or have web applications driven by MySQL.

    If you do things correctly, the transfer will be virtually seamless and you may even be able to pull it off without any apparent downtime for anyone! :D

    (Incidentally, you can also force which IP your computer resolves for a
    domain by putting an entry in your local "hosts" file on your home computer
    for the domain you would like to connect on the new server. The hosts
    file is located in "/etc" (Linux) and "C:\Windows\System32\Drivers\Etc" (Windows)
    and like routing cache, superceeds actual real IP resolution)
     
    #4 Spiral, Sep 10, 2009
    Last edited: Sep 10, 2009
  5. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The Express Transfer feature configures the old server to redirect traffic to the new server, including email. Stale DNS entries could still result in a user hitting the wrong server for cPanel access. This can be mitigated by suspending, or terminating, the account on the old server after the transfer.
     
  6. fniederm

    fniederm Member

    Joined:
    May 8, 2003
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    I am running cPanel 11.24.5. How come i don´t see express transfer?
     
  7. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    In the single account transfer interface the feature is labeled as Point Account on Source Server to New Server. In the multiple account transfer interface the feature is labeled Express Transfer
     
  8. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    That is incorrect. Express Transfer is available in cPanel 11.24 ( and I think 11.23 ).
     
  9. fniederm

    fniederm Member

    Joined:
    May 8, 2003
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the quick reply. I tried it out, but I doesn't quite seem to do what it is supposed. The website points to the old server till dns is propagated.
    What is it supposed to really do? Apache redirect?

    Thank you
     
  10. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Assuming you used Express Transfer (or "Point Account on Source Server to New Server") on a transfer among cPanel servers, what should happen is this:

    - Users that have received updated DNS information will go directly to the new server
    - Users with stale DNS information will first go to the old server. This old server now has a DNS record that points the user to the new server (rather than serving content from the old server). This means the redirection is handled via DNS, not Apache redirects.

    If you did not use this functionality or are doing a transfer from a server with a control panel other than cPanel/WHM (or, somehow, this did not work as intended), those with stale DNS information will continue to receive a page served by the old server.
     
  11. TaneNZ

    TaneNZ Active Member

    Joined:
    Apr 11, 2007
    Messages:
    37
    Likes Received:
    0
    Trophy Points:
    6
    If you're going to be migrating a lot of servers between data centres (i.e. can't just move the IPs directly), then I'd highly suggest researching/testing a proxy approach.

    With iptables you can transparently forward all traffic for a specific IP to another IP. Or alternatively just specific ports on an IP. Another approach would be to use RINETD (which does port forwarding/redirection) - RINETD(8)

    The only thing you have to be weary of is that if somebody hits the old server, then on the new server the visitor will appear to come from the old server. The biggest problem I found with this is if you have a client popping to the old IP, that IP will become whitelisted on the new IP, and spammers can connect to the old IP on port 25 and spam away. You need to put in an exim ACL to check:

    is this connection from the old server IP?
    if it is, is the sender domain listed in /etc/localdomains?
    if the sender isn't listed, then is the recipient listed in /etc/localdomains?

    the reasoning is; if it's from the old server IP and the sender or recipient domain isn't listed in /etc/localdomains, it will be a spammer.

    That aside it's a great way to 'instantly' migrate servers between datacentres.
     
  12. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    As David pointed out, the Zone records on the old server are updated to point to the new server. Also an Apache redirect is installed on the old server, pointing to the new server.

    Since it seems you are experiencing issues with this, I recommend opening a support ticket so we can identify the peculiars and resolve them.
     
  13. Datcrack

    Datcrack Well-Known Member

    Joined:
    Dec 31, 2006
    Messages:
    47
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Istanbul / TURKEY
    cPanel Access Level:
    Root Administrator
    I'm afraid express transfer failed for me. It gives out an error and doesn't change the dns records. What's the old fashion way for this ? Do I need to the edit some dns files and change their ips to the new one or should I use dns clustering feature ? I don't want to have any down time nor anybody going to the old server.

    Thanks.
     
  14. sgriffin

    sgriffin Member

    Joined:
    Nov 15, 2003
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    Exactly,
    Ensure your account is fully working on the server, your files and db are there.

    Ensure you have records for new name servers on the new server that are resolving.
    You'll add some hosts with ips that go to the new server. ns6 ns7 for example.
    Then you'll edit the zone file for the domain you are moving.
    Change the soa name sever to one that lives on the new server.
    Update the serial to one that's higher.
    Change the ns records, change the a record to the new ip
    service restart named
    You should be able to see a ping change if you're in shell on the server.
    if you're on a windows box, run cmd with administrator privileges.
    Do an "ipconfig /flushdns"
    And ping. You should see a new ip responding.
    Once the new server is responding well, then you can change the ns records for the domain at your registrar. I would wait a few days anyway while all kinks are out of your new server. Because you can always undo your process quickly until you've changed your domain at your registrar.
    For example your new server could die and your ns servers would be unreachable and the only way out its another registrar change to your old ns records.
     
Loading...

Share This Page