best practice for unbound logs with logrotate

Jaap Akkerhuis jaap at NLnetLabs.nl
Mon Jul 29 18:30:53 UTC 2019


 ѽ҉ᶬḳ℠ via Unbound-users writes:

 > Have tried various settings in logroate but none seems to able to tame 
 > the unbound logs.
 >
 > Anyone with a similar usecase who would not mind sharing some good 
 > practice for unbound logs with logrotate?

I use syslog for logging, but if you log to file and use logrotate,
you need to tell unbound to release the logfile. Thefore I suggest
to do something like:

       /var/log/unbound.log {
           rotate 5
           weekly
           postrotate
               unbound-control log_reopen
           endscript
       }

See also man unbound-control.

	jaap



More information about the Unbound-users mailing list