I have a server collecting syslog messages from the network. Logrotate is currently setup and working, and the config looks like such:
/logs/*/log {
daily
rotate 60
}
Instead of rotating daily, I'd like weekly. Obviously, I'm keeping 60 days' logs, so I would likely be changing the rotate 60
to rotate 8
, which would keep 8 weeks' logs.
My questions are these:
- If I change from daily to weekly and keep 8 logs, when logrotate runs will it delete the 52 oldest daily logs, or is it smart enough to notice the date stamps on the files, and realize that 8 weeks’ time is 2 months ago?
- If I run logrotate manually with the
-f
flag to force rotation, and I did this 8 times, would I effectively wipe all logs completely? - If I go into the
logrotate.status
file and manually remove one particular log, what will happen to that particular log when logrotate runs next?