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?
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
- use mongodump to export all you database (you can use mongodump -d your_db) http://docs.mongodb.org/manual/reference/program/mongodump/
- use mongorestore to import it http://docs.mongodb.org/v2.2/reference/mongorestore/
you can also use --collection , -c for exporting/importing individual collections