mongoman
mongoman

Reputation: 69

Mongo db trying to create restorable backup

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 Mongo and mongodump in CMD 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 The downloaded  and extracted zip file The installed path with ".exe" setup

Upvotes: 2

Views: 155

Answers (2)

Sohan
Sohan

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,enter image description here

Also here

Also make sure you have installed mongodb properly. You should have following set of exe/files

Mongo Files

Upvotes: 2

Tom Slabbaert
Tom Slabbaert

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.

  1. Access the MongoDB Download Center
  2. Select your Platform from the dropdown menu, then select the following Package for your platform:
  3. Once downloaded, unpack the archive and copy the tools to a location on your hard drive.

Upvotes: 2

Related Questions