Corrext I needed a settings like this; I was trying mulitple options but
wasnt working. Let me try this!!
Thanks for providing the same.
Post by Browne, Stuart via bind-usersHow about a clear, direct example of using external service 'logrotate'
(this is from one of my redhat systems, but the same concept applies to
/var/log/named/*.log {
compress
create 0644 named named
daily
dateext
missingok
notifempty
rotate 30
sharedscripts
postrotate
/usr/sbin/rndc reconfig > /dev/null 2>/dev/null || true
endscript
}
We put our logs in the custom location of '/var/log/named/'; if you put
them somewhere else, you'll need to change that. The other settings are
direct references to Anand's email. Finally, you'll want to change the 30
to 180 to keep 180 different days worth of logs.
BIND internally doesn't have the concept based rotation, only size-based
rotation. In order to achieve per-day logs, you'll need to use the external
tool 'logrotate' (or similar) for your rotation. If you do that, you'll
want to disable BIND's rotation in the logs configuration (if you're using
logging {
channel ns_log {
file "/var/log/named/named.log" versions 3 size 256M;
severity dynamic;
print-time yes;
print-severity yes;
print-category yes;
};
...
category default { ns_log; };
category general { ns_log; };
category config { ns_log; };
};
logging {
channel ns_log {
file "/var/log/named/named.log";
severity dynamic;
print-time yes;
print-severity yes;
print-category yes;
};
...
category default { ns_log; };
category general { ns_log; };
category config { ns_log; };
};
Hope this clarifies the idea a little for you.
Stuart
Of *Blason R
*Sent:* Thursday, 5 July 2018 4:44 PM
*Cc:* bind-users
*Subject:* Re: Logrotate for bind9
What exactly are those? Well what I wated to achieve here is to rotate the
logs daily and start new file; then compress
Why not use Bind logging option?
Hi There,
I am not getting appropriate results for my custom daily logrorate for
bind9 logs on Ubuntu.
Can someone please help me with the settings which would include below
stuff
1. Should rotate daily
2. Compress
3. create new file
4. keep last 180 entries
Do I need stop bind9 while logs are being rotated? What is the correct
procedure to start logs in new file?
_______________________________________________
Please visit https://lists.isc.org/mailman/listinfo/bind-users
<https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.isc.org_mailman_listinfo_bind-2Dusers&d=DwMFaQ&c=MOptNlVtIETeDALC_lULrw&r=udvvbouEjrWNUMab5xo_vLbUE6LRGu5fmxLhrDvVJS8&m=x_efXEDdzrHXkr39lk-t7Ive0PUrBu39XyHVKIxYr-c&s=I6mnsNje8UKA-DWyQZnQG_y1ejr_e49gbkmN5JNAZrs&e=>
to unsubscribe from this list
bind-users mailing list
https://lists.isc.org/mailman/listinfo/bind-users
<https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.isc.org_mailman_listinfo_bind-2Dusers&d=DwMFaQ&c=MOptNlVtIETeDALC_lULrw&r=udvvbouEjrWNUMab5xo_vLbUE6LRGu5fmxLhrDvVJS8&m=x_efXEDdzrHXkr39lk-t7Ive0PUrBu39XyHVKIxYr-c&s=I6mnsNje8UKA-DWyQZnQG_y1ejr_e49gbkmN5JNAZrs&e=>