mongodb 3.2 dump to mongodb 3.4 restore error


mongodb 3.2备份导出再3.4版本恢复的时候报错:createIndex error: The field 'safe' is not valid for an index specification.

3.4版本验证索引有效性,备份数据可能包含无效索引所以加一个不恢复索引的选项就可以了。

--noIndexRestore


Whatever is worth doing is worth doing well.