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
Showing posts with label mongoDB. Show all posts
Showing posts with label mongoDB. Show all posts
Thursday, November 17, 2016
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/
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/
Subscribe to:
Posts (Atom)