-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: Legacy C++ Implementation
-
Component/s: mongodump
-
None
Pre-steps:
- Start a mongod instance with auth using 2.4.
- Upgrade this node to 2.6, and upgrade the user authorization model to v2.6 using authSchemaUpgrade. Now users in all the databases are in the admin database, and the old system.users collections in the non-admin databases are left untouched.
When we use mongodump -d to dump a specific database, there are different behaviour with/without --dumpDbUsersAndRoles:
- mongodump without --dumpDbUsersAndRoles will not dump the old system.users collection. This is expected based on the code here.
- However, mongodump with --dumpDbUsersAndRoles will dump the old system.users collection. Since the user authorization model is already upgraded to v2.6 and users are now in the admin databases, it will dump the users for the specific database from the admin database, we should not dump system.users collection from this database any more.