Logrotate for bind9

Anand Buddhdev anandb at ripe.net
Wed Jul 4 15:57:44 UTC 2018


On 04/07/2018 17:43, Tom wrote:

Hi Tom,

> ...or you use "copytruncate", so the file will be copied and the other
> stuff (compress, rotate 180, etc..) and then truncated, so BIND has
> still the same filedescriptors open, but the logfile is rotated :-).
> This way, you don't need to "rndc reconfig".

Sorry, but this is not good advice, and I strongly urge everyone not to
follow it.

Copying a file takes a finite amount of time, so the copy may not have
all the latest logs, and those are lost when the original is truncated.
The bigger the log file, the higher the chance of losing log messages.

The logrotate man page also notes this possibility of losing log
messages, and this option should only be used as a last resort, where
there's no way to tell a program to reopen its log file. BIND has no
such limitation, and so "rndc reconfig" is the right way to handle
reopening its log file.

Regards,
Anand


More information about the bind-users mailing list