Created
July 7, 2019 01:15
-
-
Save xlbruce/740b03d3e9a8f8e4cf4b24c123a04874 to your computer and use it in GitHub Desktop.
logrotate example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/var/log/app.log { | |
rotate 30 | |
daily | |
missingok | |
compress | |
delaycompress | |
dateext | |
olddir /var/log/app | |
dateformat .%Y-%m-%d | |
postrotate | |
echo Run commands... | |
endscript | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment