Created
September 7, 2013 02:01
-
-
Save daryltucker/6472153 to your computer and use it in GitHub Desktop.
Copy Collection from one Database to another, local Database. [MONGO]
This file contains 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
db.<collection_name>.find().forEach(function(d){ db.getSiblingDB('<new_database>')['<collection_name>'].insert(d); }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment