Skip to content

Instantly share code, notes, and snippets.

@fclairamb
Last active May 30, 2016 05:45
Show Gist options
  • Save fclairamb/5298565 to your computer and use it in GitHub Desktop.
Save fclairamb/5298565 to your computer and use it in GitHub Desktop.
Logrotate parameters to have small and easy to backup logs. Because xz consume a lot of CPU, setting cron with a idle ionice and a 19 nice level.
# /etc/logrotate.d/00-default-parameters
weekly
rotate 12
create
compress
delaycompress
dateext
compresscmd /usr/bin/xz
uncompresscmd /usr/bin/unxz
compressext .xz
compressoptions -9
@seefood
Copy link

seefood commented May 30, 2016

does the -9 and -3 really differ that much when running XZ on log files? the process is so much more resource hungry that I am hesitant to go there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment