check the master/slave status

Niall O'Reilly Niall.oReilly at
Fri Jan 7 09:44:27 UTC 2011

On 7 Jan 2011, at 09:10, pyh at wrote:

> I just want to write a script for checking master and slave to make sure they have been always syncing the data correctly. What's the idea for doing it? 

	Initial condition:
	dig @master zone SOA
	dig @slave zone SOA
	check that serials match
	  if not, work out why and fix

	Check whether slave is tracking master:
	update zone on master
	dig/dig/check once more
	  if not matched, as before

	dig/dig/check as often as is reasonable
	  treat a mismatch as a problem

	No doubt many people have written scripts to do this.  Even if
	you end up preferring someone else's, writing your own once is
	a good way to learn what's involved.

	I'm not familiar with any except my own.  These 'work for me',
	but aren't packaged attractively enough for me to inflict them
	on others.  8-)

	If your zones are properly delegated, and your servers accessible
	from the public Internet, then the web-based remote-checking tools
	available at or are excellent.
	Either of these will give you some ideas about what to include in
	the script you want to write.

	Have fun!

	Niall O'Reilly

More information about the bind-users mailing list