Mongodb – Merging MongoDB files

mongodb

Mongo stores data in files named xxx.0 and xxx.ns under the db folder. Is it possible to copy these files to another machine where I have a mongo instance running and merge them to create a single document? Has anyone done this before? Is there a better way to do this?

Best Answer

what exactly are you trying to accomplish? do you want to have all db on another machine?

then you have to use these export and import it

you can also use --collection , -c for exporting/importing individual collections