[nsd-users] Question on slave

Anand Buddhdev anandb at ripe.net
Tue Dec 5 09:48:43 UTC 2023


On 04/12/2023 13:47, Jean-Christophe Boggio via nsd-users wrote:

Hi Jean-Christophe,

> When syncing between master and slaves, am I supposed to see new files 
> appear in the slave's "zonesdir" directory? Because, as you might 
> expect, I see nothing here. Is this behavior normal? From what I 
> understand, the slave "caches" the data in /var/lib/nsd/nsd.db (I'm 
> using debian).

By default, NSD doesn't write out zone files on the secondary. It stores 
all the data in nsd.db, as you've observed.

You can make NSD write out zone files, by setting the option 
"zonesfile-write" to a number above 0, and setting "zonefile" to 
something like "<zonename>.zone" for each secondary zone. NSD will then 
write out changed zones to plain text files. This is in *addition* to 
saving the zone data in nsd.db.

Alternatively, you can disable the database altogether by setting 
"database" to the empty string. Then, NSD will not create nsd.db, and 
will instead write out zone files every hour (this is for efficiency, to 
prevent too many disk writes on a busy secondary server).

Note that the "database" option is deprecated, and will go away with the 
upcoming 4.8.0 release. So you should probably disable it in your config 
too.

Regards,
Anand Buddhdev


More information about the nsd-users mailing list