I have set /etc/logrotate.conf (details below) to rotate once a week, but it continues to rotate logs daily.
It started to behave like this after I changed the rotate number from default 4 to 10, and later back to 4.
A logrotate script is in the /etc/cron.daily folder, but I don't think it is the cause of the problem.
What did I do wrong? Should I empty the file /var/lib/logrotate/logrotate.status to reset its references?
Thank you all!
Code: Select all
# see "man logrotate" for details
# rotate log files weekly
weekly
# keep 4 weeks worth of backlogs (Default: 4)
rotate 4
# create new (empty) log files after rotating old ones
create
# use date as a suffix of the rotated file
dateext
# uncomment this if you want your log files compressed
#compress
# RPM packages drop log rotation information into this directory
include /etc/logrotate.d
# no packages own wtmp and btmp -- we'll rotate them here
/var/log/wtmp {
monthly
create 0664 root utmp
minsize 1M
rotate 1
}
/var/log/btmp {
missingok
monthly
create 0600 root utmp
rotate 1
}
# system-specific logs may be also be configured here.