(Hello&Help with) logrotate omits specified parameters of particular logs
Hello.
I'm testing logrotate and can't find out why some settings are not taken in in use in my configuration.
I configure logrotation of yum log for testing purposes.
I edidted yum file in /etc/logrotate.d/ directory and put:
/var/log/yum.log {
daily
start 0
rotate 2
compress
create 0600 root root
}
Now. In /var/log is only one log yum.log
I execute logrotate command with -f to not edit /var/lib/logrotate.status all the time and what I see
I see compressed backup of yum.log (yum.log-'today_date'.gz) which looks good at first glance but is not imho.
I exec ommand more time and nothing happens)
I I understand correctly it should create backup with .0 suffix .1 and then rotate when next occurence. Somehow rotate and start is not taken in use while compress is working at least.
Please help me.
BTW in some tutorials rotate means how many (count) rotates will be kept.
While in /etc/logrotate.conf comment says:
# keep 4 weeks worth of backlogs
I'm confused.
Waiting for some good explanation.
Thank you.
Update.
It started work for me when commented - it seems it is not ovewriten by rotate parameter.
# dateext
But the question is stil valid
in some tutorials rotate means how many (count) rotates will be kept.
In /etc/logrotate.conf comment says:
# keep 4 weeks worth of backlogs
but in man for rotate is something different
How this two parameters correspond each other?
Last edited by makupl; 09-12-2013 at 05:27 AM.
Reason: more tests
|