[SERVER-732] copyCollection command Created: 11/Mar/10 Updated: 30/Jan/19 Resolved: 22/Jan/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Namlook | Assignee: | Geert Bosch |
| Resolution: | Won't Fix | Votes: | 88 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Sprint: | Storage NYC 2019-01-14, Storage NYC 2019-01-28 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||
| Description |
|
make a copy of a collection { copyCollection : "foo" <short collection name, not full namespace> |
| Comments |
| Comment by Brian Lane [ 22/Jan/19 ] | |
|
We have decided to close this issue as won't fix. Due to security concerns, we feel it is better to use mongodump and mongorestore tools to transfer data between nodes. You can choose to run those tools on the same host running the mongod process if that fits with your security policy. There is also the db.cloneCollection() method, but this doesn't work when authorization is enabled on the from server. Feel free to comment on this issue to provide additional feedback to us. -Brian | |
| Comment by David Schrooten [ 15/Nov/17 ] | |
|
It's ridiculous that this functionality is still not included in MongoDB 3.6. It's quite important when working with large collections and multiple databases on the same server. You could extend the cloneCollection functionality to allow connections to instances with auth enabled. | |
| Comment by Timothee Cour [ 25/Jan/17 ] | |
|
Asked here https://groups.google.com/forum/#!searchin/mongodb-user/timothee$20cour|sort:relevance/mongodb-user/lSVXFPrtbaA/9fPuQNiLCQAJ Btw, @Namlook can we rename this issue as `cloneCollection + renaming` (more descriptive) | |
| Comment by Albert Engelbrecht [ 03/Apr/14 ] | |
|
Also worthy to note that the workaround also is prone to type changes as well. | |
| Comment by Anthony Fejes [ 27/Mar/14 ] | |
|
Signed up just to vote for this - it's a very basic operation that really should just be an extension to the copyCollection command, and William is absolutely right - the work around is very slow, when this should be a quick operation. | |
| Comment by [ 13/Jan/14 ] | |
|
While the workaround works it is much slower than copyCollection. Also there is a need to address authentication which is not provided in the proposed API. | |
| Comment by Daryl Tucker [ 07/Sep/13 ] | |
|
Temporary solution/workaround:
| |
| Comment by Eliot Horowitz (Inactive) [ 19/Apr/11 ] | |
|
This will get done in vote order |