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.

Moving the master DNS to a new server - advice?

Discussion in 'Bind / DNS / Nameserver Issues' started by spaceman, Apr 28, 2004.

  1. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    Hi All,

    I'm going to need to do this in a week or two, and so I'd thought I'd ask for some help/advice/reassurance in advance. :)

    I've got 4 dedicated servers, let's call them A, B, C, and D in age/speed order (oldest first).

    Currently, they're all in a master/slave DNS trust relationship. A is the DNS master/primary nameserver, B is the secondary, and so B, C, and D are all DNS slaves of A.

    I want to make D, our newest server, the new master/primary nameserver. I want to do this so that we can decommission A (affter copying all hosted accounts from it to D, which we're doing now).

    So, I'd really appreciate some feedback, advice, do's and don'ts, in order that I can make the switch in a way that removes or minimises downtime.

    This actually might be incredibly easy to do with zero risk of downtime, so perhaps someone has done it before and can share their experience?

    Thanks very much in anticipation.

    P.S. Unless the advice is overwhelmingly unanimous, then I'd prefer not to move to DNS clustering at this stage because of a) the ongoing lack of supportive documentation, b) my data centre not (yet) supporting it, and c) a few forum posts implying that it's not smooth sailing for everyone (yet) who switches to clustering.
     
  2. r00t316

    r00t316 Active Member

    Joined:
    Nov 29, 2003
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    This is quite simple and you should not have any down time.

    I can assist you if you would like msg me in private.

    Here is what needs to be done.
    Where ever you registered the name server A you need to go their and changes it's ip to the new server D
    Domain Registars control what IP is associated with what name server.
    This will probably take 72 hours to propagate.

    After that is done above, do this on name server A do the following
    cd /var/name
    tar -pcf - named | ssh -l root D "cat > /var/named.tar"
    That will tar the dir on A and transfer it to D
    Then on server A do
    cat /etc/named.conf | ssh -l root D "cat > /etc/named.conf"

    That will overwrite the named.conf on D if you don't want to do that then make the file named.conf.serverA or whatever.

    Do this on server D
    cd /var/
    tar -pxvf named.tar

    if you just copied named.conf to server D and overwrote the default you can just do rndc reload ; tail -f /var/log/messages
    That will restart named and you will tail the log file to see if you see zones loading.

    Done.
    Once the IP changes to server D you will then be using server D as your primary name server.

    Also just in case some changes were made on A once the IP points to server D you may want to do the processes above again to make sure you have the latest updated files.

    Hope this helps.
     
  3. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    Thanks very much r00t316, I'll study your advice and add more comments shortly and/or let you know how we go.
     
  4. r00t316

    r00t316 Active Member

    Joined:
    Nov 29, 2003
    Messages:
    34
    Likes Received:
    0
    Trophy Points:
    6
    ok good luck.
     
  5. bking

    bking Well-Known Member

    Joined:
    Mar 1, 2004
    Messages:
    206
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Sydney
    Here is how I transferred all sites from a non cPanel box to a cpanel box on a different IP.

    ns1 is the current box. ns2 is an offsite secondary DNS.
    I registered the new cpanel box's IP as dns01

    Now, as the old box is non cpanel I just move them all manually.

    create account on new box.

    transfer web/mail/anything else.

    now set the secondary (ns2) to use the new dns01 as the master so it will update from the new box.

    Copy the zone file over to the old ns1 so that it serves the current content of the zone.

    For the domains I have control over, I redelegate to dns01 and ns2. For the ones I dont...no biggie as the old ns1 is serving the new zone details.

    Once all sites are transferred, change the IP for ns1 in both the zone file and via the registrar as being a registered DNS server to the same IP as dns01.
    Hope I havn't left anything out


    Hope this makes sense..
     
  6. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    481
    Likes Received:
    0
    Trophy Points:
    16
    Thanks bking, I will factor in your advice too. :)
     
  7. Aquitaine

    Aquitaine Member

    Joined:
    May 7, 2003
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Calcutta
    clustering

    I thought you'd rather use dns clustering now
     
Loading...

Share This Page