title: Using the C# driver Is their a better way to duplicate and copy a MongoDB collection?
body: <p>I have multiple MongoDB servers for dev, staging and production and I want to automate some of the deploy process from Dev->Staging and Staging->Live. Duplicating collections by hand means using the rather fabulous MongoVUE tool (<a href="http://www.mongovue.com/" rel="nofollow">http://www.mongovue.com/</a>) but clearly that's not an ideal solution for automation!</p>
  
  <p>So from within the C# Driver, is there a way to duplicate a collection on the same server? And is there a way to copy an entire collection (with indices intact) to a different server?</p>
  
  <p>I've tried looping through collections, retrieving documents from server A then inserting them into server B. This approach feels clumsy, lengthy and error prone. Is there a better way?</p>
  
  <p>Thanks!</p>