Skip to content

Instantly share code, notes, and snippets.

@daryltucker
Created September 7, 2013 02:01
Show Gist options
  • Save daryltucker/6472153 to your computer and use it in GitHub Desktop.
Save daryltucker/6472153 to your computer and use it in GitHub Desktop.
Copy Collection from one Database to another, local Database. [MONGO]
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