mysql-operator icon indicating copy to clipboard operation
mysql-operator copied to clipboard

Implement backup policies

Open calind opened this issue 3 years ago • 1 comments

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).

calind avatar Sep 15 '21 09:09 calind

This may involve an upgrade of the MysqlCluster GVK. Is our next version v1beta1?

cndoit18 avatar Oct 08 '21 08:10 cndoit18