Reputation: 69
I got databse with name "test" in mongoatlas. I installed mongodb with
mongodb-windows-x86_64-4.4.1-signed.msi
I run this command and it does not shows my test db. I'm trying to make backup my db
show dbs
admin 0.000GB
config 0.000GB
local 0.000GB
I watched tutorial to how to backup&restore in mongodb. So I run the command
mongodump
It says
'mongodump' is not recognized as an internal or external command,
operable program or batch file.
but I can run mongo and mongod command. I gave a path to run mongodb in cmd to environment variables
Also they say in the docs use mongodump command in cmd. I tryed it with administrator mode and it still gives same think.
So how can I backup& restore dbs. Thank you
Upvotes: 2
Views: 155
Reputation: 6809
You will have to set the MongoDB install path in your Path
environment variables
For eg :
My mongoDB is installed at C:\Program Files\MongoDB\Server\4.0\bin
In environment variables i should have,
Also make sure you have installed mongodb properly. You should have following set of exe/files
Upvotes: 2
Reputation: 22296
mongodump
is part of the mongo database tools, these tools are not automatically installed when your install certain Mongo server bundles.
As in your case, your cmd line does not recognise this command because it was never installed on your machine.
Follow the instructions here in order to install it.
- Access the MongoDB Download Center
- Select your Platform from the dropdown menu, then select the following Package for your platform:
- Once downloaded, unpack the archive and copy the tools to a location on your hard drive.
Upvotes: 2