-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support redis(standalone replica) pitr #7998
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wangyelei
reviewed
Aug 20, 2024
wangyelei
reviewed
Aug 20, 2024
wangyelei
approved these changes
Aug 26, 2024
@Chiwency It would be helpful to explain your implementation approach in the PR description so that everyone can understand it. |
ldming
approved these changes
Aug 27, 2024
|
The addon PR is apecloud/kubeblocks-addons#961 |
Chiwency
added a commit
to Chiwency/kubeblocks
that referenced
this pull request
Aug 28, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #7999
We leverage the AOF backup feature from Redis version 7.0 onwards to implement Point-In-Time Recovery (PITR). By enabling the
aof-timestamp-enabled yes
andaof-disable-auto-gc no
parameters, we activate AOF timestamp annotations while disabling the automatic cleanup of historical AOF files. A StatefulSet, which is continuously responsible for the ongoing backup process, manages and tracks the AOF files.The continuous backup process works as follows:
${base_file_ctime}.${seq}.${suffix}
, wherebase_file_ctime
is the creation time of the base aof file, marking the start of this particular backup package. This timestamp creates a continuous timeline for all backups. Theseq
is a sequence number used for recovery in case of a backup pod failure.The recovery process works as follows:
DP_RESTORE_TIME
, the backup package with thebase_file_ctime
closest toDP_RESTORE_TIME
is selected. This base file's data is used as the starting point. Then, AOF files are processed according to their timestamp annotations , up untilDP_RESTORE_TIME
is reached.