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

Incorrect cmd-line option specified in the failure suggestions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 2.8.0-rc4
    • mongorestore
    • None
    • Not Needed

    Description

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: