In github.com/skpr/operator are CRDs which you can use to handle backups and restores of applications with state stored in mysql and persistent volume claims.
The three CRDs are:
- Backup - Takes a list of PVCs and databases to backup, and stores them in a restic repository.
- BackupScheduled - Essentially a cronjob template for Backup, but with a cron expression to define the frequency.
- Restore - Takes a backup ID, and destination PVCs and mysql databases to restore to.
Here are example YAML manifests which define how each object should run.
@todo
Need the restic repository secret- Install the CRDs (see below for links to manifests)
@todo
Install RBAC policies.@todo
Run manager statefulsets.