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

Official Linux packages don't set up logrotate

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Do
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 1.6.3
    • Component/s: Packaging, Stability
    • Environment:
      Debian or Ubuntu systems using the official packages from the 10gen repositories.
    • Server Development Platform
    • v4.7, v4.4
    • Dev Platform 2020-01-13, Dev Platform 2020-09-21, Dev Platform 2020-10-05, Dev Platform 2020-10-19, Dev Platform 2020-11-16

      The Ubuntu and Debian packages don't add an entry to /etc/logrotate.d that rotates the logfile in /var/log/mongodb. So on a production system, the file /var/log/mongodb/mongodb.conf just grows unchecked. This will prove problematic for beginners who don't realize that's an issue until they suddenly run out of disk space. Something like this in /etc/logrotate.d should do it:

      180:/var/log/mongodb# cat /etc/logrotate.d/mongodb
      /var/log/mongodb/mongodb.log

      { daily missingok rotate 7 compress copytruncate notifempty create 640 root adm }

            Assignee:
            backlog-server-devplatform [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive)
            Reporter:
            chl Chris Lea
            Votes:
            22 Vote for this issue
            Watchers:
            24 Start watching this issue

              Created:
              Updated:
              Resolved: