mongorestore --db with --archive selects which database to restore

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 3.2.0
    • Component/s: Tools
    • None
    • ALL
    • Hide

      1. mongodump --host=onedatabase --archive --gzip --db=onedatabase | mongorestore --host=otherdatabase --archive --gzip --db=otherdatabase --drop
      2. "otherdatabase" does not exist.

      Show
      1. mongodump --host=onedatabase --archive --gzip --db=onedatabase | mongorestore --host=otherdatabase --archive --gzip --db=otherdatabase --drop 2. "otherdatabase" does not exist.
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Original summary

      mongorestore --db option not working as documented

      Description

      The documentation for mongorestore dictates that you use --db to specify which database to restore data into. However, if you ie. use mongodump --db=A and then mongorestore --db=B to restore, nothing will be created. You have to specify the same database name as used in the dump.

            Assignee:
            Kelsey Schubert
            Reporter:
            Tais Hansen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: