BIND: Migrate zones from named.conf to rndc addzone without downtime?

Solution 1:

I don't know that there is any tooling provided for this, but my suggestion for an approach would be:

  • Decide what is actually acceptable (I'm going to go with what was suggested by "which wouldn't be too bad for one zone", that minimal downtime might be ok rather than a strict "no downtime" requirement)
  • Clone the environment so that you can test this particular migration scenario
  • Write a script that enumerates the zone names and the bodies of the zone definitions from a config (the two main things that you will want to feed to rndc addzone)
  • Run it, and make sure it works. I suppose the state you need to be in is: named running, old zone definitions not loaded but available in a file for your script (easy if those are isolated to some specific include file(s))
  • Determine if it's quick enough to be acceptable in terms of downtime. If not, consider an approach of doing it "TV chef-style", having the resulting output already prepared and then just doing an "Indiana Jones-style" swap between old files and new files during downtime.