-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 4.2.8
-
Component/s: mongorestore
-
Environment:mongorestore version: r4.2.8
git version: 43d25964249164d76d5e04dd6cf38f6111e21f5f
Go version: go1.12.17
os: darwin
arch: amd64
compiler: gc
If you run the mongorestore with the database name in the uri you will get an error. For example:
mongorestore --drop --uri mongodb://localhost/mydb --collection languages ./languages.bson
{{ 2020-07-17T14:17:09.142-1000 Failed: cannot restore a collection without a specified database}}
However, if you add --db, which the documentation warns you should not do, it works just fine.