1

For production backup, MongoDB recommends mongodump instead of mongoexport for accuracy of data. However, a few operational issue remain unclear to me, appreciate if anyone can advise on this matter.

Logging

How to redirect mongodump's progress log into a file or some other repository rather than stdout? I tried the following code but it simply output an empty file and all logs remain in stdout.

mongodump --host MONGO --out %FULLPATH% --oplog >> out.log

Error Handling and Retry

Does mongodump return some error code when it failed? I used windows task scheduler to run mongodump and it always consider the job has been run successfully while mongodump may have failed silently.

I'm running this in Windows.

  • Which version of mongodb are you using? – Aayushi May 26 '16 at 14:03
  • Both 3.0 and 3.2 – Lee May 26 '16 at 14:45

Your Answer

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

Browse other questions tagged or ask your own question.