Mongodb database backup on windows
Asked Answered
A

1

6

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:
Ablution answered 16/2, 2016 at 15:52 Comment(0)
W
7
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.

Whitmer answered 16/2, 2016 at 16:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.