user2492364
user2492364

Reputation: 6693

logrotate: did not compress file

Here is my custum logrotate file

/var/log/mysite/uwsgi.log {
    daily
    missingok
    rotate 10
    compress
    notifempty
    copytruncate
}

And I check the result today:

-rw-r-----.  1 root     root     74441041 12月  2 13:13 uwsgi.log
-rw-r-----.  1 root     root     72226790 12月  2 03:44 uwsgi.log-20151202

I did not set delaycompress,but why it did not compress it???
Should I need to do something after edit the file?

Upvotes: 1

Views: 1943

Answers (1)

Taggart Comet
Taggart Comet

Reputation: 128

Option compress compresses old files. It is ok that you have two uncompressed files. With you config you will get 1 original uncompressed file + one last rotated uncompressed file + 9 compressed files.

Upvotes: 2

Related Questions