How to Import .bson file format on mongodb -


i've exported database on server using mongodump command , dump stored in .bson file. need import in local server using mongorestore command. it's not working. correct mongorestore command , other tools restore db?

it's simple import .bson file:

mongorestore -d db_name -c collection_name path/file.bson 

incase single collection.try this:

mongorestore --drop -d db_name -c collection_name path/file.bson 

for restoring complete folder exported mongodump:

mongorestore -d db_name path/ 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -