[SERVER-11461] mongorestore with --drop doesn't drop admin.system.roles or admin.system.version. Created: 29/Oct/13  Updated: 11/Jul/16  Resolved: 29/Jan/14

Status: Closed
Project: Core Server
Component/s: Security, Tools
Affects Version/s: 2.5.3
Fix Version/s: 2.5.5

Type: Bug Priority: Major - P3
Reporter: Spencer Brody (Inactive) Assignee: Spencer Brody (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-12369 Update mongodump and mongorestore to ... Closed
related to SERVER-10493 Update tools to support backing up an... Closed
Operating System: ALL
Participants:

 Description   

Running mongorestore --drop will not actually clear out the contents of admin.system.roles because you can't call drop on system collections. admin.system.users is special cased to use remove() to clear out the old users, we should do something similar with admin.system.roles and admin.system.version.



 Comments   
Comment by Githook User [ 29/Jan/14 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@mongodb.com'}

Message: SERVER-12369 SERVER-11461 Update mongodump and mongorestore to properly handle users and roles in 2.6

There are some known caveats:
(1) It's not safe to run mongorestore while user-management commands are
executing on a live system (SERVER-12539).

(2) To restore 2.4 users to a 2.6 system that has never had any users added, you
must manually insert the version document indicating v1 users into
admin.system.version, which must be done by a highly privileged user, before
beginning the restore (SERVER-12541).
Branch: master
https://github.com/mongodb/mongo/commit/dac6264fb0f0040f7bd8784ed44c33e4a1318d5b

Comment by auto [ 01/Nov/13 ]

Author:

{u'username': u'stbrody', u'name': u'Spencer T Brody', u'email': u'spencer@10gen.com'}

Message: SERVER-11499 SERVER-11461 Fix dumprestore5.js and expand it to include roles
Branch: master
https://github.com/mongodb/mongo/commit/ce43f6c474d099f85b8dd02848ce4a1faecbc178

Generated at Thu Feb 08 03:25:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.