[SERVER-16680] Include logrotate script for MongoDB Created: 29/Dec/14 Updated: 13/Jan/15 Resolved: 13/Jan/15 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Packaging |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Victor Hooi | Assignee: | Ernie Hershey |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Participants: | |||||||||
| 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. |