7

I have BIND 9 set up and running on my local machine to answer DNS queries locally. I know it's not neccessary; my router has a built-in nameserver. But I do that for learning purposes.

Now I need BIND to dump it's cache before terminating (shutting down the machine, for example), and then reloading it from the same file automatically upon starting. Is there a way to do this. I know that

rndc dumpdb

can do the first trick (although, manually). So how to configure BIND to automatically do both chores for the sake of performance, so that I wouldn't unnecessarily lose all the cache after a reboot?

Marwan Tanager
  • 217
  • 2
  • 5

1 Answers1

5

+1 for a good question, but I must disappoint. While it's entire feasible to write the dump command into your shutdown scripts and a corresponding load command into your startup scripts, there's no "load cache from file" command.

It could be reasonably implemented, particularly if one were to decrement the cache timers based on how long ago the cache file was written. Presently (and I don't see this being accepted into the codebase), it's just not there.

Jeff Ferland
  • 20,547
  • 2
  • 62
  • 85