I had various MongoDB instances that I wanted to unify into one:
mongodump --dbpath ~/instance1 -d mydb -c mycoll
mongodump --dbpath ~/instance2 -d mydb -c mycoll
...
The workflow I imagined was that I'd dump all the database, then run `mongorestore`. In actuality, dumps will be overwritten by subsequence mongodump commands, so the workflow would be:
mongodump --dbpath ~/instance1 -d mydb -c mycoll
mongorestore
mongodump --dbpath ~/instance2 -d mydb -c mycoll
mongorestore
Probably works as intended, but may be worth documenting that the dump files will be overwritten.