Hi all,
i would like to have a configuration on log rotate that will gzip my log files with date pattern %Y-%m-%d
move these files to an olddir, but i want to avoid that the logrotate removes my files from old dir newer than 180 days
i applyied this config
#logrotate config to compress files
/my/dir/test/*????-??-??* {
compress
daily
dateformat _%Y-%m-%d
maxage 180
rotate 180
missingok
dateext
notifempty
size +1k
olddir /my/dir/test/gzipped/
}
i thought it will work just fine,
but when i debug it with the option
logrotate -dv /etc/logrotate.d/test
it print that the logrotate is trying to rotate the same file 180 times
and is doing the same for all the files, but i shouldn't, and also it is removing the file.
can you help me guys on what i'm missing here.
P.S Sorry if this is not the correct section.