Closed ti-chi-bot closed 3 months ago
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign mikechengwei for approval. For more information see the Code Review Process.
The full list of commands accepted by this bot can be found here.
This is an automated cherry-pick of #5667
What problem does this PR solve?
This PR is addressing the issue issue-5657
Adding support for the logRestoreStartTs option in the PITR restore spec.
What is changed and how does it work?
With this update, the Point-in-Time Recovery (PITR) restore mode allows users to apply PITR logs within a specified time range. Specifically, users can define the start and end timestamps using the logRestoreStartTs(start timestamp) and pitrRestoredTs(end timestamp) options in the restore spec, respectively. This enhancement enables more precise control over the restoration process, allowing users to restore data to an exact point in time by specifying the interval of PITR logs to be applied.
After this change the user can use a combination of pitrFullBackupStorageProvider and pitrRestoredTs, to restore the full backup snapshot and apply PITR logs. or else a combination of the logRestoreStartTs and pitrRestoredTs options in the restore spec to apply PITR logs within a specified time.
If the user fails to specify either the pitrFullBackupStorageProvider or logRestoreStartTs option in the restore specification, the restore job will result in an error.
Code changes
Tests
PITR up to mentioned restoreTs along with full backup restore.
TiDBCluster
TiDBCluster
to test the backup restoration.Apply PITR logs within a specified time range.
Create a
restore-pitr.yaml
file as follows, then usekubectl apply
to apply the yaml.`
restore-pitr.yaml
`
Side effects
Related changes
Release Notes
NONE