Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-223

mongodump(2.6) --dumpDbUsersAndRoles should not dump the old <db>.system.users collection if the authorization model is upgraded to 2.6

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: Legacy C++ Implementation
    • Component/s: mongodump
    • None

      Pre-steps:

      1. Start a mongod instance with auth using 2.4.
      2. 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.

            Assignee:
            kyle.erf Kyle Erf
            Reporter:
            linda.qin@mongodb.com Linda Qin
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: