[SERVER-27059] copyDatabase() fails due to document validation Created: 16/Nov/16 Updated: 16/Nov/16 Resolved: 16/Nov/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Usability |
| Affects Version/s: | 3.3.15 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Richard Bibb | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Steps To Reproduce: |
|
||||||||
| Participants: | |||||||||
| Description |
|
when calling the command db.copyDatabase() the command will fail if one of the documents in a collection fails document validation. This probably isn't a bug but it is undesirable behaviour. When requesting a copy of a database that is what I want, a copy, warts and all. In my case this problem comes about because in the early days of my database I didn't have document validation in place. Later on I put validation in place and enforced it strictly. |
| Comments |
| Comment by Richard Bibb [ 16/Nov/16 ] | |
|
Thanks Dan for your very speedy response | |
| Comment by Daniel Pasette (Inactive) [ 16/Nov/16 ] | |
|
You can run the copydb command using the bypassDocumentValidation flag. In the mongo shell:
However, I checked the copydb documentation and I see that the flag is missing. Thanks for pointing this out. Also, please note that the shell helper does not support this flag, you must use the command itself. I'll raise a DOCS ticket. Dan |