Mongodb .bson import -


i newbie mongodb.

i have 1 database collections in .bson format , metadata in json file. , how can import database.?

my files :

employeedetail.bson & employeedetail.meatadata.json

for importing json files mongodb try this.

mongoimport --db db_name --collection collection_name --type json --file file_name.json 

and bson can use mongorestore.

https://docs.mongodb.org/manual/core/backups/#importexporttools-mongorestore


Comments