Reputation: 101
In a normal logrotate.d configuration file, is there any way to set an unlimited amount of potential logs?
The only thing I can seem to come up with is setting it at some crazy number that will never be met. Something like:
/var/log/app/* {
missingok
weekly
copytruncate
rotate 10000000000
compress
notifempty
olddir /var/log/app/old
}
But that seems pretty hacky to me.
Upvotes: 6
Views: 6021
Reputation: 289755
From UNIX logrotate man page:
rotate count
Log files are rotated times before being removed or mailed to the address specified in a mail directive. If count is 0, old versions are removed rather then rotated.
So I guess you need to write a huge number to work.
Upvotes: 5