Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mongodb database backup on windows

Ive got a problem concerning the mongodump function provided in mongodb. When the below code is run on mongodb shell it doesnt respond,

Mongodump --db database1 --out path:
like image 288
Naveed Sheriffdeen Avatar asked Feb 16 '16 15:02

Naveed Sheriffdeen


1 Answers

mongodump  --db students --collection grades

Here students is the name of the database and grades is the name of the collection.

Running this command will create a folder named dump in your current working directory. A folder with the name of your database will be created inside the dump folder within which you'll get a collection_name.bson file and collection_name.metadata.json file.

P.S. : Make sure you're running this command outside mongo shell.

like image 182
SiddAjmera Avatar answered Sep 21 '22 17:09

SiddAjmera