After changing logrotate configuration from "nocompress" to "compress", one of lotated files will disappear
Issue
-
After changing logrotate configuration from "nocompress" to "compress", one of lotated files will disappear.
-
A situation which lotates with nocompress
-rw------- 1 root root 0 Jun 6 xx:xx /var/log/messages -rw------- 1 root root 14353 Jun 6 xx:xx /var/log/messages.1 -rw------- 1 root root 46 Jun 6 xx:xx /var/log/messages.2 -rw------- 1 root root 60 Jun 6 xx:xx /var/log/messages.3 -
Changing the logrotate configuration from "nocompress" to "compress", and executing logrotate
# logrotate -f /etc/logrotate.conf -
Then a current log is compressed but the latest lotated file (i.e. messages.1) disappears
-rw------- 1 root root 0 Jun 6 xx:xx /var/log/messages -rw------- 1 root root 24 Jun 6 xx:xx /var/log/messages.1.gz <== size 14353 file disappeared -rw------- 1 root root 46 Jun 6 xx:xx /var/log/messages.2 -rw------- 1 root root 60 Jun 6 xx:xx /var/log/messages.3
-
Environment
- Red Hat Enterprise Linux 5
- logrotate
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
