Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm removing the delaycompress function from my logrotating script. Before running logrotate again, should I compress the last log myself ?

This is the actual situation:

-rw-r-----  1 root adm  4,7M  5 mag 18:38 access.log
-rw-r-----  1 root adm  5,2M 29 apr 05:44 access.log.1
-rw-r-----  1 root adm  473K 22 apr 05:45 access.log.2.gz
-rw-r-----  1 root adm  605K 15 apr 05:44 access.log.3.gz
-rw-r-----  1 root adm  588K  8 apr 05:44 access.log.4.gz

The question is: Should I compress "access.log.1" and THEN launch logrotate ?

Or logrotate will understand I removed the "delaycompress" option and fix things himself ?

share|improve this question

From my quick tests, you'll need to compress the file yourself. However, you find can exactly what it'll do by running it in debug mode:

logrotate --debug --force /etc/logrotate.d/apache2

Obviously, change the path to the location of your config file :)

share|improve this answer

Your Answer


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.