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?)?
Thank you in advance
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?)?
Here, I have made a php front-end to manage dns zones and entries.
So for the slaves, it's only a little php script that connects to the same database and fetches the zone names to build the conf file...
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.
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