Skip to content

cloneCollection is not a viable alternative to copyTo #2171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2015

Conversation

devkev
Copy link
Contributor

@devkev devkev commented Feb 17, 2015

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