-
Notifications
You must be signed in to change notification settings - Fork 106
PITR
Andrew Pogrebnoy edited this page Jul 20, 2020
·
9 revisions
Enabling/disabling of the PITR sampling is made via config value pitr.enabled
.
$ pbm config --set=pitr.enabled=true
$ pbm config --set=pitr.enabled=false
Enabling PITR means some agent on each replicaset is going to save oplog chunks to the storage defined in the config. Detailed on the storage layout see PITR: storage layout EditNew Page. Each chunk, with some exceptions described below, captures about 10 min span of oplog events. In order for chunks to be useful for the restore, the chunk consequence should follow two restrictions:
- The chunks chain should form a continuous timeline. Since any gap would violate the consistency of data changes.
- The chunks chain should begin after some backup snapshot. Since the oplog is roughly speaking a log of events applied to some data. And during the restore we need to recover this data in the first place before replying the events and "moving" to the specified point in time.
- The chunks timeline shouldn't be overlapped with any restore events. Since the restore is intruding the events timeline making it invalid - chunk couldn't continue its lineage to the snapshot anymore since the "snapshot data" was rewritten.