multi-master with mysql backend

Torinthiel torinthiel at
Mon Feb 14 17:54:17 UTC 2011

Dnia 2011-02-14 15:52 Mike Mitchell napisał(a):

>I'd keep two copies of the BIND config, one that has all the zones as 
"master", and one that has all the zones as "slave".  When the master dies, 
run a little script on a slave that freezes the zones, edits the SOA to make 
that server the MNAME and increment the serial, then thaws the zone. Swap 
out the config with the "master" config, and now you have a new master.
>Before the broken master comes back online, swap out its config with the 
"slave" config.
>No need for rsync or mysql, BIND replication does all the work for you.  
Just be sure the updates go to the server listed in the MNAME field of the 

Nice idea. I'd go even further - why keep two configs? Have a file with your 
list of zones, and two scripts that generate either master or slave config. 
Now you are keeping one common config on both severs, which changes only 
when you add/remove a zone, and two scripts which are almost identical, 
except for one line (master address). This should be easier to maintain.
Now, just in case, you could put on startup scripts the one that generates 
slave config, so if it reboots you don't have two master servers.
And you could cook up a more complicated script, that tries to ping the 
other server and runs master config generation, freeze, soa change, thaw, 
reload and send you an email - and you have fully automated HA.

More information about the bind-users mailing list