So, I have a request to set up log rotation.
It's a rhel 8.9, using logrotate.
I decided to re-open this, instead of a new question.
I just want to see if my logrotate config is correct.
Quote:
/recv/*-confg {
monthly
rotate 24
maxage 184
olddir /recv/oldlogs
compress
delaycompress
}
|
I might not need the rotate 24 syntax, but I wanted to make sure nothing under 6 months got deleted.
I ask, as I have tried to run logrotate -d /etc/logrotate.d/ciscobackup
And I get no output into the directory I created /recv/oldlogs. Would that be because I have it set for monthly, and since it hasn't been a month, it isn't rotating anything? That seems to be what the message says. "log does not need rotating (log has been rotated at 2024-5-17 9:0, that is not month ago yet)"
I am just looking for confirmation. If that's the case, I assume if I change it to daily, then it should work, daily.