Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-3966

mongodump won't dump a specific db/collection using admin credentials

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.1.1
    • Affects Version/s: 2.0.0
    • Component/s: Tools
    • Labels:
      None
    • ALL

      Tested with a 3 node replica set using auth.

      1. Dump everything using admin credentials works:
        ./mongodump --username admin --password mypassword --out dumpfiles
        connected to: 127.0.0.1
        all dbs
        DATABASE: foo to dumpfiles/foo
        foo.things to dumpfiles/foo/things.bson
        10000 objects
        foo.system.indexes to dumpfiles/foo/system.indexes.bson
        2 objects
        foo.system.profile to dumpfiles/foo/system.profile.bson
        60 objects
        foo.system.users to dumpfiles/foo/system.users.bson
        2 objects
        DATABASE: admin to dumpfiles/admin
        admin.system.users to dumpfiles/admin/system.users.bson
        1 objects
        admin.system.indexes to dumpfiles/admin/system.indexes.bson
        1 objects
      1. Dumping a specific database using admin credentials fails
        ./mongodump --username admin --password mypassword --db foo --out dumpfiles
        connected to: 127.0.0.1
        Tue Sep 27 11:45:38 DBClientCursor::init call() failed
        assertion: 10276 DBClientBase::findN: transport error: 127.0.0.1 query: { authenticate: 1, nonce: "3112e50c77ef2be", user: "admin", key: "173615f515dc85297a54cb81933675d9" }
      1. Dumping a specific database with user credentials works
        ./mongodump --username foouser --password foopassword --db foo --out dumpfiles
        connected to: 127.0.0.1
        DATABASE: foo to dumpfiles/foo
        foo.things to dumpfiles/foo/things.bson
        10000 objects
        foo.system.indexes to dumpfiles/foo/system.indexes.bson
        2 objects
        foo.system.profile to dumpfiles/foo/system.profile.bson
        49 objects
        foo.system.users to dumpfiles/foo/system.users.bson
        2 objects

            Assignee:
            benjamin.becker Ben Becker
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: