Can logrotate set limits on archived file size?
This is my problem: logrotate works great at limiting how often I want to rotate my logs based on size and/or date. And it lets me limit how many old copies of logs I want to keep.
My problem is that the total size of my archived logs occasionally gets too large. I can set a limit on how many old copies I want, but not how large to allow them to grow. And yes, I compress them. Is there a way to limit their size within logrotate? Thanks! |
It does feel like something that logrotate should be able to do with a single directive, but I know of no other way than to write a script to prune however you like, then call it from a "prerotate" or "postrotate" section.
|
All times are GMT -5. The time now is 07:16 PM. |