After doing some updates to my DNS set up I ran some standard checks. And it took me a while to realize that for some reason my zone didn’t load correctly and the secondary server was used.
So I dove into the logs and low and behold I saw this:
zone dusares.com/IN: journal rollforward failed: journal out of sync with zone
zone dusares.com/IN: not loaded due to errors.
And it dawned on me. I am currently implementing my own little dynamic DNS updater and all the updates are stored in a journal. Fine, I can re-run my tests and simply remove that journal (.jnl files. In Debian based distributions they are in /var/lib/bind) before restarting BIND.
That works of course but should not the way how you should handle things. Especially not, if you need the content of the journal. So here is the correct way of doing it:
rndc freeze dusares.com
- apply changes to zone file
rndc reload dusares.com
rndc thaw dusares.com