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

Incorrect cmd-line option specified in the failure suggestions

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.8.0-rc4
    • Affects Version/s: None
    • Component/s: mongorestore
    • None
    • Not Needed

      If there is already a collection "admin.tempusers" / "admin.temproles", the mongorestore fails with suggestion of a command-line option that does not exists. i.e.

      $ mongorestore --port 30017 -d test1 --restoreDbUsersAndRoles -u test1_br -p test1_br dump/test1 --drop --authenticationDatabase admin
      connected to: 127.0.0.1:30017
      assertion: 17410 admin.tempusers collection already exists, but is needed to restore user data.  Drop this collection or specify a different collection (via --tempUsersColl) to use to temporarily hold user data during the restore process
      $ 
      $ 
      $ mongorestore --port 30017 -d test1 --restoreDbUsersAndRoles -u test1_br -p test1_br dump/test1 --drop --authenticationDatabase admin --tempUsersColl "myTempUsers"
      Error parsing command line: unknown option tempUsersColl
      try 'mongorestore --help' for more information
      

      The correct option should be:

      Bad Value Good Value
      tempUsersColl tempUsersCollection
      tempRolesColl tempRolesCollection

            Assignee:
            matt.kangas Matt Kangas
            Reporter:
            anil.kumar Anil Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: