Ok,
Let's say I have 2 BIND servers (master & slave), the master fail's. The slave still answer to the queries... However, they do not have the zone files on the file system...
If I reboot the slave, will it still be aware about the content of the zones ?
Is there a procedure to rewrite the zone file on that slave and then I just change the config to make it the master ?
Provided that you specified a
file
in the definition of the slave zone (it's common practice to do so), the zone data will be stored in that file and will be available across restarts.From the slave zone section of the manual:
However, it's worth noting that if the master is unavailable for an extended period of time the zone expiration timer will eventually come into play; the server with the slave zone will stop serving the zone after not being able to reach the master for the amount of time specified in the
SOA
EXPIRE
field (usually weeks).It is possible to change a slave zone to a master zone, but it's worth noting that modern BIND versions have different defaults for
masterfile-format
for master and slave zones (master zones aretext
, slave zones areraw
), so your file may be in a different format than expected if you just switchtype
fromslave
tomaster
.Either override the
masterfile-format
setting or convert the zone file (egnamed-compilezone -f raw example.com db.example.com
).