[SERVER-2863] Error creating index admin.system.users during mongorestore Created: 29/Mar/11 Updated: 12/Jul/16 Resolved: 29/Jul/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Admin |
| Affects Version/s: | 1.8.0 |
| Fix Version/s: | 1.9.2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ricardo Dias | Assignee: | Spencer Brody (Inactive) |
| Resolution: | Done | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Participants: | |||||
| Description |
|
We've had an error during mongorestore. Error creating index admin.system.users: 11000 E11000 duplicate key error index: admin.system.users.$id dup key: { : ObjectId('4d8352711a9f859ddd7de952') } We'd used the --drop option on mongorestore, but it created the users again without removes them. Because that, it generated the error during index creation. The command used for backup: The command used for restore: The complete restore log: , v: 0 } |
| Comments |
| Comment by Spencer Brody (Inactive) [ 29/Jul/11 ] |
|
The problem was that we have checks that prevent dropping system collections, so the system.users collection doesn't get dropped, then you get duplicate key values when trying to add back in the same users. The fix special cases the system.users collection in mongorestore and manually adds/removes entries instead of relying on the dump command to clear the collection first. |
| Comment by auto [ 29/Jul/11 ] |
|
Author: {u'login': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@10gen.com'}Message: Make mongorestore be able to properly restore system.users with --drop. |
| Comment by Richard Kreuter (Inactive) [ 30/Mar/11 ] |
|
Have a reproduction case. Probably fixing this tomorrow. Thanks for the report. |