Mongorestore DocumentValidationFailure Error while restoring oplog
0
votes
0
answers
28
views
I am trying to restore my oplogs from one database to another using mongodump & mongorestore utility. During dump I have faced no issue and overall dump was extracted but while restoring that dump I was facing follwing issue. I have attached all information along with this Topic.
**Error:**
> Failed: restore error: error applying oplog: applyOps:
> (DocumentValidationFailure) Document failed validation
**Mongodump command:**
> nohup mongodump --uri="source-db-connection-uri/local" --collection=oplog.rs --out=/path/to/mongdump-folder/oplog/oplog-04-03-2025 --query '{"ts": {"$gte": {"$timestamp": {"t": 1741190170, "i": 5953}}, "$lt": {"$timestamp": {"t": 1741234631, "i": 2452}}}}' --gzip &> /path/to/mongdump-folder/oplog/logs/oplog-04-03-2025.log
**Mongorestore command:**
> mongorestore --gzip --uri "target-db-connection-uri/?authSource=admin" --oplogReplay --dir /path/to/mongdump-folder/oplog/oplog-04-03-2025
**Source-DB Information**: MongoDB Atlas with mongod 7 installed
**Target-DB Information**: MongoDB Community Edition with mongod 8 installed
Neither of my databases have any kind of validations setting on
Please review the details and let me know if any additional information is needed.
***Note**:* I have also tried this with MongoDB 7 Community Edition but facing same issue.
Asked by Mehul Sanghvi
(1 rep)
Mar 12, 2025, 06:43 AM
Last activity: Mar 12, 2025, 06:44 AM
Last activity: Mar 12, 2025, 06:44 AM