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.

I have a daily logrotate set up with compress, missingok, delaycompress, dateext options. I need to compress the delayed log file. Can I do it manually now or should I wait till logrotate does it when it runs.

I'm just not sure whether logrotate has some internal storage, will it get confused if it'll see the file already compressed?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

If I remember correctly, logrotate only uses the file names in the rotation and only the name will be changed if you compress the file. It won't even care for the file contents once they are rotated (if even before). You should be able to compress a file freely, but if you do it somehow differently, you may end up with that file out of the rotation just lying around in the directory.

Either way, I believe there is no harm in trying. It should be impossible to "confuse" logrotate.

share|improve this answer
    
Thanks - I shall just compress it and make the filename as other compressed files. –  rATRIJS Mar 2 '12 at 11:23
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.