Reputation: 141
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
Upvotes: 14
Views: 26345
Reputation: 579
For windows10, please add the path in the environment variable section.
Firstly, download the mongodb data tools by https://www.mongodb.com/try/download/database-tools
For your reference, my path is: C:\Program Files\MongoDB\Tools\100\bin
Finally, open the Windows PowerShell:
PS C:\>mongodump --version
The version of the mongodump should be shown which the setting is ok.
mongodump version: 100.5.3
git version: 139703c0587796da96c367f365473d0266f9cede
Go version: go1.17.8
os: windows
arch: amd64
compiler: gc
ref link: https://www.mongodb.com/docs/database-tools/installation/installation-windows/
Upvotes: 10
Reputation: 231
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.
Upvotes: 23
Reputation: 2402
You need to run set path
command first, if you have installed mongodb.
set path="<mongodb installed directory which contain mongodump file>"
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.
Upvotes: 5