You are looking at the documentation of a prior release. To read the documentation of the latest release, please
visit here.
New to KubeStash? Please start here.
KubeStash Backup Verification
KubeStash supports verifying backups using different types of verification strategies.
Before You Begin
- You should be familiar with the following
KubeStashconcepts:
How Backup Verification Process Works
The following diagram shows how KubeStash verifies backups. Open the image in a new tab to see the enlarged version.
The backup process consists of the following steps:
At first, a user creates a
Secret. This secret holds the credentials to access the backend where the backed up data will be stored.Then, she creates a
BackupStoragecustom resource that specifies the backend information, along with theSecretcontaining the credentials needed to access the backend.KubeStash operator watches for
BackupStoragecustom resources. When it finds aBackupStorageobject, it initializes theBackupStorageby uploading themetadata.yamlfile into the target storage.Then, she creates a
BackupConfigurationcustom resource that specifies the targeted application, the Addon info with a specified task, etc. It also provides information about one or more repositories, each indicating a path and aBackupStoragefor storing the backed-up data. Then, she creates aBackupVerifiercustom resource and each repository refers toBackupVerifierwhich contains the configuration for verification.KubeStash operator watches for
BackupConfigurationobjects.Once the KubeStash operator finds a
BackupConfigurationobject, it createsRepositorywith the information specified in theBackupConfiguration.KubeStash operator watches for
Repositorycustom resources. When it finds theRepositoryobject, it InitializesRepositoryby uploadingrepository.yamlfile into thespec.sessions[*].repositories[*].directorypath specified inBackupConfiguration.Then, it creates a
CronJobfor each repository referring to aBackupVerifierwith the schedule specified inBackupVerifierto trigger backup verification periodically.On the next scheduled slot, the
CronJobtriggers a backup verification by creating aBackupVerificationSessioncustom resource.KubeStash operator watches for
BackupVerificationSessioncustom resources.When it finds a
BackupVerificationSessionobject, it creates aRestoreSessioncustom resource referring to the latestSnapshotas datasource.Then it resolves the respective
AddonandFunctionand prepares restoreJob(s) definition.After a successful restore, it creates a verifier
Jobdepending on the verification type.The
Jobruns queries or script to verify backup.After the backup verification is completed, the backup verifier
Jobupdates the status field ofBackupVerificationSession.
Types of Verification Strategies
Currently, we have the following types of backup verification strategies:
- RestoreOnly : KubeStash operator will initiate a
RestoreSessionusing the addon information specified inBackupVerifier. The verification of the backup will rely on the status of theRestoreSessionphase; if the restore completes successfully, the backup is considered verified. - Query : At first, KubeStash operator will initiate a
RestoreSessionand after successful restore, it will create a verifier job to run the queries provided inBackupVerifier. - Script : At first, KubeStash operator will initiate a
RestoreSessionand after successful restore, it will create a verifier job to run the script provided inBackupVerifier.






