Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Using RHEL6.1 & logrotate 3.7.8-12.

I'm able to use logrotate & rotate my files. What I don't want is compression. For some reason, even after specifying 'nocompress', some files are getting compressed. Here's is my config file:

/var/audit_logs/*-audit.log {

     nocompress
     notifempty
     nodelaycompress
     nodateext
     rotate 5
     missingok
     sharedscripts
     postrotate
              /usr/bin/killall -HUP rsyslogd
     endscript }

Running as:

/usr/sbin/logrotate -v -f /etc/logrotate.d/audit_logs

Even after these settings, I see .gz files in my /var/audit_logs directory.

Also, I've been digging into the logrotate source code, have put more debug message around compression code, but in vein. I don't get any compression related debug messages at all.

Any idea, why is logrotate still creating .gz files?

share|improve this question
    
Try to move nocompress right above postrotate. Once I had a problem caused by the position of directives –  Nikolaidis Fotis Mar 4 '13 at 15:05
    
Solved. It was another similar config file which has 'compress' mentioned. Silly! Thanks for reply. –  Rathor Mar 5 '13 at 14:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.