Search code examples
jsonmongodbmongoidbson

How to use bsondump in windows


How to use bsondump and its command in windows.

when i am running bsondump foo.bson > foo.json

error: 'bsondump' is not recognized as an internal or external command, operable program or batch file.

I want to convert a bson file into json file in windows that is generate by mongodb fooRollback() command.


Solution

  • Your command-line usage is correct. The error message means that you are not at the current directory of MongoDB's bin files, or that you don't have a PATH entry for that directory.

    After you have downloaded MongoDB, you will find bsondump.exe in the .\bin\ folder.