-
-
Save joe1chen/4ac0bdc817cd872b9d88 to your computer and use it in GitHub Desktop.
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
# Put this in /etc/logrotate.d/mongodb | |
# http://stackoverflow.com/questions/5004626/mongodb-log-file-growth | |
/log/*.log { | |
daily | |
rotate 30 | |
compress | |
dateext | |
missingok | |
notifempty | |
sharedscripts | |
postrotate | |
/bin/kill -SIGUSR1 `cat /data/mongod.lock 2> /dev/null` 2> /dev/null || true | |
endscript | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment