Consider a server which generates extensive logging, which are archived using logrotate and bz2:
"/var/log/uwsgi/*/*.log" {
copytruncate
daily
rotate 14
compress
delaycompress
missingok
notifempty
compresscmd /bin/bzip2
uncompresscmd /bin/bunzip2
compressext .bz2
}
Using hourly
rotation is not convenient for log inspection in real time (problems tend to happen just when the hour changes), and daily
rotation gets the disk full far to often.
Is there a way to set logrotate to run every given amount of hours? An invocation every 6 hours would be perfect for my case.
/var/log/uwsgi/*/*.log
) to be rotated every 6 hours. – Adam Matan Nov 12 '14 at 05:52logrotate
. – muru Nov 12 '14 at 05:53