Recently I made a db dump on a MongoDB 2.4 server like this:
mongodump --db veye_dev
And I tried to restore it on a MongoDB 2.6 server like this:
Unfortunately at some point the restore process failed with this error message:
mongo error: "Btree::insert: key too large to index, failing
There are some restrictions for the size of the index in MongoDB 2.6. Luckily I found the issue on MongoDBs ticket system. The import can succeed if the mongod process is running with the parameter “failIndexKeyTooLong=false”. Just start it like that:
sudo mongod --setParameter failIndexKeyTooLong=false
And now execute the mongorestore again. That worked for me.