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.

Change zone files en masse

Discussion in 'General Discussion' started by edigest, Jun 16, 2014.

  1. edigest

    edigest Active Member

    Joined:
    Nov 24, 2010
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    S. Pole
    cPanel Access Level:
    Root Administrator
    Apologies if this is in the docs; can't find it.

    I want to change zone files en masse. That is for a block of domains, for example, I want to change ns7 and ns8 to ns1 and ns2.

    Is there an API or CPanel script I can leverage?

    Lastly, can I directly edit /var/named/<domain>.db safely? (And is that the zone file?) In the absence of an API, I'm fine with writing a script to edit the zone files.
     
    #1 edigest, Jun 16, 2014
    Last edited: Jun 16, 2014
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    36,471
    Likes Received:
    1,217
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    You could use the "replace" command to update multiple zone files and then update the serials. There is a thread on this here:

    Bulk DNS Zone Update

    Thank you.
     
  3. edigest

    edigest Active Member

    Joined:
    Nov 24, 2010
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    56
    Location:
    S. Pole
    cPanel Access Level:
    Root Administrator
    Excellent! Not sure how I missed that initially, but the thread you linked to answered all of my questions.

    Many thanks!
     
Loading...

Share This Page