Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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

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

  1. wizzy420

    wizzy420 Well-Known Member

    Joined:
    Nov 13, 2007
    Messages:
    127
    Likes Received:
    2
    Trophy Points:
    68
    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,216
    Likes Received:
    10
    Trophy Points:
    313
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice