cloneCollection Command

Copy a single collection from one server to another.

db.runCommand( { cloneCollection: <namespace>,
                 from: <host> [,query: <query_filter>] [,copyIndexes:<bool>] } );

Copies a collection from one server to another. Do not use on a single server as the destination is placed at the same db.collection (namespace) as the source.

The local copy of the namespace is emptied before the copying begins. Any existing data will be lost there.

Follow @mongodb

MongoDB Pittsburgh - May 15
MongoNYC - May 23
MongoDB Paris - Jun 14
MongoDB UK - Jun 20
MongoDC - June 26


Labels

clonecollection clonecollection Delete
command command Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

PLEASE POST QUESTIONS IN THE USER GROUPS FORUM. Post non-question comments and helpful hints here.

blog comments powered by Disqus