mysql-operator
mysql-operator copied to clipboard
Implement backup policies
Currently we backup on a simple crontab entry and we keep the last X backups. We should allow for more complex scenarios, like keep the last 24 hourly backups, the last 7 daily backups, and the last 4 weekly backups.
To do this we should deprecate/migrate backupSchedule
, backupURL
, backupSecretName
, backupScheduleJobsHistoryLimit
, backupRemoteDeletePolicy
and have a backupPolicy
entries and have something like:
backup:
url: s3://....
remoteDeletePolicy: ...
secretName: ...
schedule:
- name: "hourly"
keep: 24
cron: "0 * * * *"
- name: "daily"
keep: 30
cron: "0 0 * * *"
Another way to define a backup schedule would be the tarsnapper format (https://github.com/miracle2k/k8s-snapshots#how-the-deltas-work).
This may involve an upgrade of the MysqlCluster
GVK
. Is our next version v1beta1
?