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

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

  • 2
    Say I have a database called "test" and a collection called "coll". My colleague also has the same database and collection on his localhost. Now we want to combine the data on his machine and my machine and put it on a server. Would mongodump and mongostore help in that case. If not, what is the best way to do what I am trying to do? – user3559051 May 6 '14 at 13:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.