newbe: syncing all zones of a bind server

Nate Campi nate at wired.com
Sun Jan 13 19:23:48 UTC 2002


On Sun, Jan 13, 2002 at 07:35:44PM +0100, steven wrote:
> 
> I'm looking for a solution to keep two (or more) nameservers absolutly in
> sync. Up to now I've been setting up the zone on the 'master' dns and
> defining a corresponding slave zone on the slave zone. this works fine, but
> since I'm working in a hosting environment I have to handle many zones with
> nearly no subdomains. the two dns servers actually just have to be
> completely identical.
> is there a way to set bind (8/9) in a way that the slave automaticly adds
> zones newly created on the master? (and deletes them when they are removed)

Using features in BIND[8|9] and/or the DNS protocol, no - but...

I documented the way I accomplish this at http://www.campin.net/DNS/ -
complete with scripts to do it yourself. The scripts will need a little
tweaking (fix some paths for your setup, mostly).

If you're familiar with rsync or rdist, you could actually clone the 
original onto a second box, and they would both be masters for all the
zones. This might not be a bad way to do it, though I've never tried. I 
can't think of any gotchas with that method offhand - and it would even 
help if/when you mess up on the serial numbers on the master. You 
wouldn't have to mess with sequence space arithmetic or purging the zone 
from the slave, you could just sync the fixed version to the clone.

One other thing to think of if you cloned the original, is that you have
a perfect backup master if the original master dies. I can't do this 
with most of my machines since I need to keep different options settings 
on some slaves. I could get around this by "including" an options 
statement that's outside the sync'd directory structure. Hmm, now you 
have me wondering if it's time for me to change my approach ;)

Either way you go, it should be scripted from as early as possible. From
that point on adding slaves is easy and doesn't change your procedure on
the master - just add a zone (or zones) and run a sync script. Done.
-- 
Nate Campi | Terra Lycos DNS | WiReD UNIX Operations

"I think there is a world market for maybe five computers."    
 - Thomas Watson, chairman of IBM, 1943. 



More information about the bind-users mailing list