[DOCS-10913] Documentation on point in time restore via mongodump Created: 18/Oct/17  Updated: 27/Oct/23  Resolved: 12/May/22

Status: Closed
Project: Documentation
Component/s: Guides
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Renato Riccio Assignee: Unassigned
Resolution: Gone away Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 6 years, 17 weeks ago
Story Points: 1

 Description   

Documentation on how to do point in time restore for a replicaset using mongodump is missing
The case is:

  • I have a filesystem snapshot from time 1
  • something bad happens at time 3
  • my oplog cover operations starting from time 0

I can perform a point in time restore:

  1. dump the current oplog (mongodump -d local -c oplog.rs)
  2. mv dump/local/oplog.rs.bson dump/oplog.bson
  3. rm -rf dump/local
  4. mongorestore --oplogReplay --oplogLimit=<seconds>

Step 1 can be optimized in order to dump only the interested time range using mongodump option

--query { "ts" : { "$gte" : start_sec }, "ts" : { "$lte" : end_sec } }


Generated at Thu Feb 08 08:01:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.