Search code examples
mongodbmongodump

Error "'mongodump' is not recognized as an internal or external command, operable program or batch file." trying to dump the database from mongodb 5.0


I am trying to dump a database from mongodb where i am getting not recognized error on running the command from command line as admin. mongodump --db ninjago, I have added the path variable in environment variables for mongodb. I am still getting the error. Please help. thanks


Solution

  • You have to additionally install MongoDB Database Tools in order to use mongodump in the CLI. If you need to restore the data, after installing MongoDB Database Tools you will be able to use the mongorestore in the CLI as well.

    You can download the MongoDB Database Tools on official MongoDB download page, and then you can follow the official installation guide.