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.

Copy an account and preserve customized DNS settings?

Discussion in 'Bind / DNS / Nameserver Issues' started by JamesAB, Nov 2, 2009.

  1. JamesAB

    JamesAB Active Member

    Joined:
    Apr 12, 2003
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    New Hampshire
    I have some sites that we are migrating from one cPanel server to a new cPanel server. The site's DNS records have some custom added "A" records.

    When I try to copy an account to the new server, the original customized DNS zone is lost and replaced with a new simple version based on the new server's settings.

    Both servers are running cPanel 11.24.5

    Is there a way to copy an account without loosing the site's DNS zone customizations?

    Thanks,
    James
     
    #1 JamesAB, Nov 2, 2009
    Last edited: Nov 2, 2009
  2. JamesAB

    JamesAB Active Member

    Joined:
    Apr 12, 2003
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    New Hampshire
    Any ideas on how to accomplish this?

    I have 30+ sites to migrate and it will be a time consuming hassle if I have to edit the DNS records one-by-one for each site to add the custom "A" records after the sites are transferred.

    Thanks for any help or suggestions,
    James
     
  3. Parcye

    Parcye Well-Known Member

    Joined:
    May 19, 2004
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Eindhoven
    How did you go about this?
     
  4. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Provided the customized DNS zones exist on the same server that hosts the cPanel accounts, and not just on standalone DNS servers, they should be preserved when transferring an account using the latest cPanel version (e.g., 11.25). I believe that the difficulty transferring customized DNS entries in cPanel 11.24.x should be resolved by using cPanel 11.25.x with the latest updates applied.
     
  5. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    If you upgraded both servers to 11.25.x (strongly recommended) then your DNS zone files would be copied over during transfer.

    You can also manually transfer the zone files (good for older Cpanel) ....

    To do this ....

    Transfer the accounts as you normally would and then copy all the *.db files from /var/named on the old server over to the new server.

    You will need to do a "sed" or "replace" to replace the old IP addresses with the new IP addresses but that should only take a few seconds to update and then you restart "named" and you are good to go.
     
  6. JamesAB

    JamesAB Active Member

    Joined:
    Apr 12, 2003
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    New Hampshire
    The problem for me (while running 11.24) was the fact that both servers were in the same DNS cluster we manage. So once you used WHM to transfer the account, the DNS information would be overwritten on both servers and it did NOT preserve any additional "A" record entries.

    To make it work I had to:
    1. Manually backup each site's DNS zone .db file
    2. Transfer the account through WHM.
    3. Edit (the backup copy) of each site's DNS zone .db file to reflect the new IP and increment the serial number to a sensible value.
    4. Use WHM to reload the edited .db files and save them for the changes to take effect.

    I used as many shortcuts as I could, but it was still a royal pain. :(

    I haven't tried this with 11.25 yet, but I hope it has gotten easier now.
     
  7. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    If changing out a server in your cluster, you should not put make the new server a part of the cluster until AFTER everything is transferred.

    Doing that prior to the transfer will create an enormous amount of added headaches and a lot more work for you that you could skip entirely by just simply waiting to cluster the new server after the transfer is done.
     
  8. JamesAB

    JamesAB Active Member

    Joined:
    Apr 12, 2003
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    New Hampshire
    Thanks for the tip.

    We tested it both ways and there was no getting around manually fixing the DNS zones in 11.24

    I described above what we went through with the servers in the same cluster.

    We tested transferring the sites to a standalone server, but that method didn't work out either because the additional "A" records were not transferred to the standalone server's DNS zones. We would have still had to manually modify the zone .db files on the original server to reflect the changes. If I remember correctly the "Change DNS on Source Server to Point to Local Server" option was also flawed because that would cause the original server to erase the DNS "A" records that we were trying to preseve.

    So, has anybody tried this in 11.25 yet?
     
Loading...

Share This Page