On 2022-08-25 04:52, Anand Buddhdev wrote:

On 25/08/2022 05:23, J Doe wrote:

Hello J Doe,

I was wondering if anyone could provide feedback on whether the following: newsyslog.conf file is correct to allow for daily log rotation for my Bind 9.16.30 logs ?

My currently logging settings in: named.conf are:

     ...
     logging {
         channel chn_file_queries {
             buffered no;
             file "/var/queries.log"
                 versions 2 size 1g suffix increment;

This configuration makes BIND rotate the file by itself, when it grows bigger than 1 GB. You do NOT need any external tool like newsyslog to do log file rotation.

Regards,
Anand

Hi Anand,

Yes, I am aware that the logging stanza I listed for the query log will do the rotation when the log reaches 1 GB and then it will rotate it and store two logs in total.

What I would like to introduce is rotation based on time. So after 24 hours, newsyslog would compress and rotate the logs and keep them for 7 days before removing the oldest. That way I always have a week's worth of query data in separate logs by day.

Was my newsyslog.conf file correct for that ?

Thanks,

- J

--
Visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from 
this list

ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.


bind-users mailing list
bind-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users

Reply via email to