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

Mongorestore should fail if db is not specified

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • 1
    • Tools and Replicator

      Mongorestore currently restores to "test" db instead of returning an error if mongorestore couldn't find db information from --db option, metadata file, or a directory name. For example:

      mongorestore salaries.bson
      

      or

      mongorestore ../salaries.bson
      

      This is not publicly documented and has caused some confusion among users.

      Link to relevant code: https://github.com/mongodb/mongo-tools/blob/master/mongorestore/filepath.go#L691-L701

            Assignee:
            Unassigned Unassigned
            Reporter:
            jian.guan@mongodb.com Jian Guan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: