-
Type: Bug
-
Resolution: Done
-
Priority: Minor - P4
-
Affects Version/s: 3.0.0
-
Component/s: mongorestore
-
None
-
Kernel Tools Iteration 3.1.1
The migration from the old tools to the newer Go-based tools has subtly changed the mongorestore behaviour for sharded systems. Previously, when making sure no "config" folder exists in your database dump you could restore to a sharded system. The new check removed the actual folder check and simply errors out when connecting to a mongos and running without a --db flag.
You can see the change here:
Old behaviour:
https://github.com/mongodb/mongo/commit/5aa8ac2e82eaf2546bff2249cb717371f9ebae23
New behaviour:
https://github.com/mongodb/mongo-tools/blob/5bc150709ee66056636c5d39a9d628907632950f/mongorestore/mongorestore.go#L91
Looking at that check it seems a workaround would be to iterate over all databases in the dump manually and running mongorestore multiple times with the --db option.
I hope this was not an intentional change but if so the 3.0 changelog should clearly reflect this.