Simple logRotate Script for MongoDB Aug 17th, 2012 logRotate.js 1 db.getMongo().getDB("admin").runCommand("logRotate") logRotate.sh 1 2 3 4 5 #!/bin/sh # Clear old logs rm /data/logs/mongod.log.* # Rotate logs mongo logRotate.js