I have a server with does a lot of different stuff like central syslog, proxy and web and which generates a lot of huge logs. For the past few weeks I have been fighting with the free space issue and I had to delete some old logs in order to free up some space. Finally I have found out a way out to help me a bit – I start using compress command in logrotate config files for some of the biggest logs I have (like messages, secure, etc).
I didn\’t actually thought of posting this, but I have found that Neo has similar problem (as described here), so I thought that this can do some use for people :)
In order to make logrotate to compress the old logs, just add a compress clause in the logrotate config for a particular log and it will make the job. If you dig into logrotate manual page, you will see that the customization is also possible through passing additional commands like compresscmd and other.