I want to copy a collection within the same database and give it a different name - basically take a snapshot.
What\'s the best way to do this? Is
In addition to AD7six 1st solution, if you use mongoexport / import be sure about your collection data types and mongo configuration, as explained here: http://docs.mongodb.org/manual/reference/mongodb-extended-json/
db.myoriginal.aggregate([ { $match: {} }, { $out: "mycopy" } ])
It is a lot faster than doing many inserts in a forEach loop.