4

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?

Teun Zengerink
  • 199
  • 5
  • 13
rATRIJS
  • 141
  • 3

1 Answers1

3

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.

XTL
  • 101
  • 9