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.

SOLVED DNS Only - How to clear all records

Discussion in 'Bind / DNS / Nameserver Issues' started by tomdchi, Dec 5, 2016.

Tags:
  1. tomdchi

    tomdchi Well-Known Member

    Joined:
    Feb 24, 2008
    Messages:
    123
    Likes Received:
    1
    Trophy Points:
    68
    Location:
    Atlanta, GA
    cPanel Access Level:
    DataCenter Provider
    I have a new DNS Only installation and something is not working right and I would like to remove all zone records and re-sync from another DNS server. Is there a procedure for doing this? The DNS Only admin does not have the option to remove zone files. Would I just remove all zones from /var/named?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    You can backup the zones, remove them from the /var/named directory, and then rebuild the /etc/named.conf file via the following commands:

    Code:
    cp -a /var/named /var/backup-named
    rm /var/named/*.db
    /scripts/rebuilddnsconfig
    Thank you.
     
  3. tomdchi

    tomdchi Well-Known Member

    Joined:
    Feb 24, 2008
    Messages:
    123
    Likes Received:
    1
    Trophy Points:
    68
    Location:
    Atlanta, GA
    cPanel Access Level:
    DataCenter Provider

    Should the files in /var/named/cache be removed as well?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,287
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Yes, you can remove the zone files from the /var/named/cache directory as well.

    Thank you.
     
Loading...

Share This Page