Logrotate and compression

We have a relatively small OS array on our system, so I was going through and enabling compression for the various logs, as they take up a ton of space when uncompressed (especially Zulu). I know that this is a newbie question and not particularly complicated, but I was looking for some confirmation before I just let 'er rip.

For the /var/log/asterisk/full log, to enable compression and retain the other default settings, I presume I can just change this line in /etc/logrotate.d/asterisk:

/var/log/asterisk/full

to this:

/var/log/asterisk/full {
compress
}

Then compress the existing rotated logs to ensure they are deleted properly.

Am I missing anything here?

Tom

Pretty well all options including the many compress ones are explained in :-

man logrotate

Yes, thank you. I already read TFM, I was just looking for a second set of eyes to confirm that what I got out of my reading was actually right.

:wink: I would say the man page should be considered authoritative. IWFM

I find

compress
compresscmd /usr/bin/lzop
compressoptions '-U -9’
compressext .lzo

gives about 92% compression on regular text files and is very fast

/bin/bzip2 -9 makes slightly smaller files at a cost of cpu ticks and time taken