mongorestore incorrectly reported an error that a collection already existed

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • 3
    • Tools and Replicator
    • 15

      A customer ran a command something like this:

      mongorestore --uri "mongodb+srv://user:password@example.mongodb.net"  --nsInclude="DB.fooHistory" --nsFrom="DB.fooHistory" --nsTo="DB.fooHistoryTest"  path/to/dump/
      

      This resulted in this error:

      Failed: restore error: timeseries collection DB.fooHistory already exists on the destination. You must remove this collection from the destination or use --drop
      

      However, it should not error because the DB.fooHistoryTest does not exist.

      The collection in question was a timeseries collection, but it's not clear if this issue only happens with timeseries collections.

      We should investigate and fix this issue.

            Assignee:
            Unassigned
            Reporter:
            Dave Rolsky
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: