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.

Removing Zone Files Not In Use, + /scripts/rebuilddnsconfig

Discussion in 'Bind / DNS / Nameserver Issues' started by wizzy420, May 7, 2009.

  1. wizzy420

    wizzy420 Well-Known Member

    Joined:
    Nov 13, 2007
    Messages:
    125
    Likes Received:
    2
    Trophy Points:
    18
    Hi All!

    I've found over time when moving domains from one host to another, etc that zone files get left behind. Sometimes the old zone file doesn't match the new zone file.

    I know of the /scripts/rebuilddnsconfig but I am not sure if it rips out "domains not on this server"

    I want to rebuild my DNSONLY servers from a fresh install. This means when I push out my domains from cPanel / WHM servers I don't want to push out the wrong domains.

    So:

    - Does /scripts/rebuilddnsconfig remove unused zone files, basing it's decisions only on hosts on the server? Or does it simply base the rebuild on what files are in /var/named/*.db?

    - If the later, is there a way to script-o-magically remove /var/named/*.db files that exist when there is no corresponding host/virtualhost/subdomain/addon domain?

    Thanks!

    W
     
  2. 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
    Actually /scripts/cleandns is what you're looking for to clean up any left-over DNS that doesn't need to be on your server anymore. After you do this, run /scripts/rebuilddnsconfig to update the named configurations.
     
Loading...

Share This Page