- On mongodb 2.4.3 a mongorestore fails to restore "test" database:
# mongorestore -uuser -ppass --host 127.0.0.1 -d test /var/backups/mongodb/.tmp/test connected to: 127.0.0.1 assertion: 18 { code: 18, ok: 0.0, errmsg: "auth fails" }
# mongo --version MongoDB shell version: 2.4.3
- On mongodb 2.2.2 this works fine:
# mongorestore -uuser -ppass --host 127.0.0.1 -d test /var/backups/mongodb/.tmp/2013-06-21_18-15-51/test connected to: 127.0.0.1 Fri Jun 21 18:16:14 /var/backups/mongodb/.tmp/2013-06-21_18-15-51/test/testData.bson Fri Jun 21 18:16:14 going into namespace [test.testData] Fri Jun 21 18:16:14 warning: Restoring to test.testData without dropping. Restored data will be inserted without raising errors; check your server log 2 objects found Fri Jun 21 18:16:14 Creating index: { key: { _id: 1 }, ns: "test.testData", name: "_id_" }
# mongo --version MongoDB shell version: 2.2.2
Did something change in the versions to not allow this anymore?