Showing posts with label mongoDB. Show all posts
Showing posts with label mongoDB. Show all posts

Thursday, November 17, 2016

How to Running mongoDB

1) Download and Install mongo DB
2) make a .bat file
3) Key in this into .bat file"C:\Program Files\MongoDB\Server\3.2\bin\mongod.exe" -dbpath "C:\data\db"
4)Download robomongo to connect it


import to MongoDB

import a .bson file:
mongorestore -d db_name -c collection_name path/file.bson

import a .bson file (Incase only for a single collection)
mongorestore --drop -d db_name -c collection_name path/file.bson

For restoring the complete folder exported by mongodump:
mongorestore -d db_name path/