[CentOS] BIND9 - automatic zone definition replication to slave

Marian Marinov

mm at yuhu.biz
Wed Jun 1 15:12:34 UTC 2011


On Tuesday 31 May 2011 11:41:47 Lars Hecking wrote:
> Martin Šťastný writes:
> > Hello,
> > 
> > I have simple question - is there a way to automatically replicate zone
> > definition (not zone itself - this is easy) to slave server using BIND9?
> > Is it BIND built-in or are there prebuilt scripts? Or I have to write
> > that script on my own (started by Cron, transfer file with zone names,
> > create conf file and finallly restart BIND?)?
> 
>  Check out incron from rpmforge. Together with rsync and possibly a bit of
>  custom scripting it should be perfect.
> 
>  I would not rsync config files directly into place, but use a staging
> area, watched by incron on the other end, so that a custom script could do
> some integrity checking before applying the update.
> 
> 

It can be done prety easy. If you move all zone definitions that has to be 
replicated into a single file and include it in the main configuration. Then you 
only need to rsync/scp that file and do 'rndc reconfig'  on the remote machine.

I'm doing this on our nameservers and it works like a charm. All zones that 
have no slaves are in different config. And I have one file per slave machine, 
which holds the zones that are replicated on it.

Marian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.centos.org/pipermail/centos/attachments/20110601/cf5e6299/attachment.sig>


More information about the CentOS mailing list