-
Notifications
You must be signed in to change notification settings - Fork 69
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
feature: Implement backup verification command #613
Merged
jjaakola-aiven
merged 1 commit into
main
from
aiven-anton/feature/backup-v3-avro-verify
May 30, 2023
Merged
feature: Implement backup verification command #613
jjaakola-aiven
merged 1 commit into
main
from
aiven-anton/feature/backup-v3-avro-verify
May 30, 2023
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
7ffa3d2
to
7e9fb33
Compare
Deploying with
|
Latest commit: |
9a9e5e1
|
Status: | ✅ Deploy successful! |
Preview URL: | https://c39df111.karapace.pages.dev |
Branch Preview URL: | https://aiven-anton-feature-backup-v-ysvz.karapace.pages.dev |
aiven-anton
commented
May 11, 2023
7e9fb33
to
fd3061d
Compare
This comment was marked as resolved.
This comment was marked as resolved.
bf3dee0
to
130b9ca
Compare
fd3061d
to
b96b5f9
Compare
35dd973
to
071226f
Compare
b2683a8
to
3003113
Compare
Base automatically changed from
aiven-anton/feature/backup-v3-inspect-command
to
main
May 29, 2023 08:41
0d27c47
to
71f01fa
Compare
8c39d4f
to
92f70bd
Compare
92f70bd
to
e28ae4b
Compare
jjaakola-aiven
previously approved these changes
May 30, 2023
Adds a CLI command to allow verifying checksum integrity of data files in a V3 backup. The command exposes a `--level` argument to allow two different granularity levels of verification. Running with `--level=file` will only inspect the bytes of data files, making sure they sum up to the expected checksums found in metadata. No parsing of records will happen when running in this mode. Running with `--level=record` is closer to a dry-run of restoration, and will parse each record and run all the integrity checks we do at restore-time: verifying checksum checkpoints, metadata checksum, as well as record count checks. Having these separate levels of verification allows running the deeper checks right after producing a backup, and building process around that to dismiss a backup should it fail the verification. This in turn allows greater confidence in running only the shallow file-level check before initiating a restoration. The suggested operations are: #### At backup-time Run backup + deep check. ```sh $ karapace_schema_backup get [...] $ karapace_schema_backup verify --level=record [...] # process should be setup to discard the backup if this fails ``` #### At restoration-time Run checksum check, then initiate restoration. ```sh $ karapace_schema_backup verify --level=file [...] # refuse to restore if this fails. $ karapace_schema_backup restore [...] ```
e28ae4b
to
9a9e5e1
Compare
jjaakola-aiven
approved these changes
May 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
About this change - What it does
Adds a CLI command to allow verifying checksum integrity of data files in a V3 backup. The command exposes a
--level
argument to allow two different granularity levels of verification.Running with
--level=file
will only inspect the bytes of data files, making sure they sum up to the expected checksums found in metadata. No parsing of records will happen when running in this mode.Running with
--level=record
is closer to a dry-run of restoration, and will parse each record and run all the integrity checks we do at restore-time: verifying checksum checkpoints, metadata checksum, as well as record count checks.Having these separate levels of verification allows running the deeper checks right after producing a backup, and building process around that to dismiss a backup should it fail the verification. This in turn allows greater confidence in running only the shallow file-level check before initiating a restoration.
The suggested operations are:
At backup-time
Run backup + deep check.
$ karapace_schema_backup get [...] $ karapace_schema_backup verify --level=record [...] # process should be setup to discard the backup if this fails
At restoration-time
Run checksum check, then initiate restoration.
$ karapace_schema_backup verify --level=file [...] # refuse to restore if this fails. $ karapace_schema_backup restore [...]