Andrey Hohutkin
Andrey Hohutkin

Reputation: 2918

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

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)

Upvotes: 1

Views: 1797

Answers (1)

Rafa Viotti
Rafa Viotti

Reputation: 10522

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.

Upvotes: 3

Related Questions