Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-16680

Include logrotate script for MongoDB

    • Type: Icon: New Feature New Feature
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Packaging
    • None

      MongoDB includes it's own log-rotation mechanism (http://docs.mongodb.org/manual/tutorial/rotate-log-files/).

      However, there is also a Linux package, logrotate, which is very commonly used. It comes installed by default on most common Linux distributions (including both Ubuntu and RHEL-distros), and many server applications will include logrotate scripts.

      Logrotate also handles things that the rather simple MongoDB log-rotation mechanism does not such as archiving of old logfiles, and compression of logfiles.

      There are many posts online on how to use logrotate with MongoDB.:

      However, there are quite a few rough edges and ways to shoot yourself in the foot.

      There is also some discussion around it on SERVER-11087, where a MongoDB engineer happens to provide a sample script.

      It would be nice if the official MongoDB packages also included a suitable logrotate script that could either be used out of the box, or used as a base to developer your own logrotate scripts.

            Assignee:
            ernie.hershey@mongodb.com Ernie Hershey (Inactive)
            Reporter:
            victor.hooi Victor Hooi
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: