Skip to content

Instantly share code, notes, and snippets.

@joe1chen
Forked from srpouyet/mongodb
Last active August 29, 2015 14:06
Show Gist options
  • Select an option

  • Save joe1chen/4ac0bdc817cd872b9d88 to your computer and use it in GitHub Desktop.

Select an option

Save joe1chen/4ac0bdc817cd872b9d88 to your computer and use it in GitHub Desktop.

Revisions

  1. joe1chen revised this gist Sep 18, 2014. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions mongodb
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # Put this in /etc/logrotate.d/mongodb
    # http://stackoverflow.com/questions/5004626/mongodb-log-file-growth

    /var/log/mongo/*.log {
    /log/*.log {
    daily
    rotate 30
    compress
    @@ -10,6 +10,6 @@
    notifempty
    sharedscripts
    postrotate
    /bin/kill -SIGUSR1 `cat /var/lib/mongo/mongod.lock 2> /dev/null` 2> /dev/null || true
    /bin/kill -SIGUSR1 `cat /data/mongod.lock 2> /dev/null` 2> /dev/null || true
    endscript
    }
  2. @srpouyet srpouyet created this gist Feb 29, 2012.
    15 changes: 15 additions & 0 deletions mongodb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    # Put this in /etc/logrotate.d/mongodb
    # http://stackoverflow.com/questions/5004626/mongodb-log-file-growth

    /var/log/mongo/*.log {
    daily
    rotate 30
    compress
    dateext
    missingok
    notifempty
    sharedscripts
    postrotate
    /bin/kill -SIGUSR1 `cat /var/lib/mongo/mongod.lock 2> /dev/null` 2> /dev/null || true
    endscript
    }