
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] logrotate with bzip2
BOTi wrote:
> Evening,
>
> I changed logrotate to compress old logfiles as bzip2. Added the
> following options to /etc/logrotate.conf
> compress
> compresscmd /usr/bin/bzip2
> uncompresscmd /usr/bin/bunzip2
> compressoptions "-9"
> compressext "bz2"
>
> The problem is that logrotate doesn't recognize bz2 compressed logfiles
> like daemon.log.1.bz2 and doesn't rename it to daemon.log.2.bz2.
> So when it comes to rotation it moves daemon.log to daemon.log.1 and
> tries to compress it, but bzip2 fails.
> I get an error from bzip2:
> bzip2: Output file /var/log/daemon.log.1.bz2 already exists.
> failed to compress log /var/log/daemon.log.1
>
> The option 'compressext ".bz2"' didn't work either.
The problem was with the parentheses.
'compressext .bz2' worked.
--
B0Ti.
Home |
Main Index |
Thread Index