标签:lin roo god and ram sha arp root host
1、编写js脚本
db.runCommand({logRotate:1})
2、编写windows批处理
mongo -u root -p root -authenticationDatabase admin localhost/admin "D:\Program Files\MongoDB\Server\3.2\data\backup\logRotate.js"
3、建立计划任务,定时执行
注:如果是linux系统下编写sh脚本即可
标签:lin roo god and ram sha arp root host
原文地址:http://www.cnblogs.com/seastar1989/p/6594176.html