Found originally on Slashdot.com but this solution sounds way better then writing custom code. Consider the Team members in all you do ….
You can do this with the command line tools mongodump and mongorestore.
Use mongodump –db [dbname] on the source computer to export all collections of the database into files
which are stored in the directory /dump/[collection].bson. Copy the files to the target computer
and then use mongorestore –db [dbname] [collection].bson to import the generated files into the consolidated database.
The contents will be appended to the existing collections as if you would use the insert command.
When you want to do it like a senior sysadmin: both command line tools have command line options to perform said operations on a remote system
and you can pipe the output of mongodump right into mongorestore, so when you want to show off you could do it with one console
command from a remote system. But when this is a one time thing and command line trickery is not your passion, rather stick to files.
or automate completely ..hmmmm !!