mongorestore failed: restore error: error applying oplog: applyOps: EOF

霸气de小男生 提交于 2020-01-16 01:47:08

问题


I created mongodb dump with next command:

mongodump /host:%MONGODB_HOST% /authenticationDatabase:admin /username:username /password:password /oplog

After that I'm trying to restore dump with a command:

mongorestore /noIndexRestore /oplogReplay /numParallelCollections:1 dump

It restores all db and fails to replay oplog:

Failed: restore error: error applying oplog: applyOps: EOF

local mongoDB version: 3.0.2 (Windows 7)

remote mongoDB version: 2.6.7 (Windows 8)


回答1:


This is a bug with the Go version of the MongoDB tools. I made a pull request on the GitHub project.

If you want an immediate solution, change the value of the oplogMaxCommandSize constant on line 17 of mongorestore/oplog.go from 1024 * 1024 * 16.5 to 1024 * 1024 * 8. Then recompile the mongorestore tool.

Update

Here is the JIRA issue. And here is the official bug fix.



来源:https://stackoverflow.com/questions/30012055/mongorestore-failed-restore-error-error-applying-oplog-applyops-eof

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!