Created
July 24, 2012 12:18
-
-
Save coldclimate/3169629 to your computer and use it in GitHub Desktop.
Copy objects from from Mongodb db.collection to another
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Dirty and not safe but ok for ditry stuff. | |
| db.CollectionOne.find().forEach(function(d){ db.getSiblingDB('ther-db').CollectionTwo.insert(d); }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment