Skip to content

cloneCollection is not a viable alternative to copyTo#2171

Merged
mpaik merged 1 commit into
mongodb:v2.6from
devkev:patch-10
Feb 17, 2015
Merged

cloneCollection is not a viable alternative to copyTo#2171
mpaik merged 1 commit into
mongodb:v2.6from
devkev:patch-10

Conversation

@devkev

@devkev devkev commented Feb 17, 2015

Copy link
Copy Markdown
Contributor

cloneCollection requires that the source and destination collections are on different mongods. copyTo only works to copy a collection within a database on a single mongod.

Therefore, it is not possible to use cloneCollection instead of copyTo. As such, we should not suggest the use of cloneCollection where copyTo does not behave as desired, since cloneCollection cannot work for that purpose and it is misleading to suggest that it can.

cloneCollection requires that the source and destination collections are on different mongods.  copyTo only works to copy a collection within a database on a single mongod.

Therefore, it is not possible to use cloneCollection instead of copyTo.  As such, we should not suggest the use of cloneCollection where copyTo does not behave as desired, since cloneCollection cannot work for that purpose and it is misleading to suggest that it can.
mpaik added a commit that referenced this pull request Feb 17, 2015
cloneCollection is not a viable alternative to copyTo
@mpaik mpaik merged commit 9339df3 into mongodb:v2.6 Feb 17, 2015
mongodb-server-docs-sync-bot Bot pushed a commit that referenced this pull request Jun 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants