Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve mongodump error "not recognized"?

Hi feel like this question has an easy answer but I just can't see it. I am using the command

Mongodump --db <name> 

and i get

'mongodump' is not recognized as an internal or external command,
operable program or batch file

. how can i get a backup of my mongodb thanks

like image 497
FlyingFox Avatar asked Aug 31 '20 13:08

FlyingFox


2 Answers

Starting with MongoDB 4.4, the MongoDB Database Tools are now released separately from the MongoDB Server and use their own versioning, with an initial version of 100.0.0. Previously, these tools were released alongside the MongoDB Server and used matching versioning.

https://www.mongodb.com/try/download/database-tools?tck=docs_databasetools

Once database tools contents are put into the bin, set the path and restart your PC.

like image 53
bosskingswag Avatar answered Sep 23 '22 14:09

bosskingswag


You need to run set path command first, if you have installed mongodb.

set path="<mongodb installed directory which contain mongodump file>"

enter image description here

If you don't want to set path every time you open command prompt. then, set the path in environment variables if you are using windows.

like image 24
Mohammad Faisal Avatar answered Sep 20 '22 14:09

Mohammad Faisal