0

I've just installed the MongoDB version 5.0 CLI tools on my workstation.

But now when I go to restore a database like I've always done I get an error:

mongorestore
mongorestore : The term 'mongorestore' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if
a path was included, verify that the path is correct and try again.
At line:1 char:1
+ mongorestore
+ ~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (mongorestore:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

If I list the MongoDB 5.0 bin directory this is what I see:

 Directory: D:\MongoDB\Server\5.0\bin


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----         7/19/2021  10:45 PM           1558 InstallCompass.ps1
-a----         7/19/2021  11:10 PM       22162432 mongo.exe
-a----         7/13/2021   2:24 PM       13275648 mongocli.exe
-a----         7/26/2021   5:02 PM            577 mongod.cfg
-a----         7/20/2021  12:14 AM       46752256 mongod.exe
-a----         7/20/2021  12:14 AM      528224256 mongod.pdb
-a----         7/19/2021  11:35 PM       29746688 mongos.exe
-a----         7/19/2021  11:35 PM      311988224 mongos.pdb

I'm using Windows 10. What happened to my trusty mongorestore and mongoimport commands? They are no longer available under version 5. How can I restore a database under MongoDB version 5.0.1?

1
  • 1
    There is a separate download for the mongorestore, mongoimport,... commands
    – prasad_
    Jul 29 at 5:14
2

Excerpt from - https://docs.mongodb.com/database-tools/

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.

Here's the link to download - https://www.mongodb.com/try/download/database-tools

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.