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

Include logrotate script for MongoDB

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Packaging
    • Labels:
      None

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ernie.hershey Ernie Hershey
              Reporter:
              victor.hooi Victor Hooi
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: