1

In another question, I've mentioned that how would I rotate logs in MongoDB Replica Set installed in Windows Server. However, it seems there's no built-in way to get it automatically on Windows - only with 3rd party tools.

That being said, I was wondering what would happen if I connect into MongoDB and execute

use admin
db.runCommand( { logRotate : 1 } )

Will it cause any unavailability in MongoDB service? Or will be just a matter to stop log capture for couple seconds and start writing in the new file?

1

The should not be any break in service. Just remember set systemLog.logRotate or --logRotate to rename or it will open same file again...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.