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.