Bug #108956 Mysql Operator backups
Submitted: 1 Nov 2022 16:17 Modified: 8 Nov 2022 15:58
Reporter: Ales Verbic (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Operator Severity:S1 (Critical)
Version:8.0.30 OS:Any
Assigned to: CPU Architecture:Any

[1 Nov 2022 16:17] Ales Verbic
Description:
When you enable full backups `backupProfile/backupSchedules/ storage PVC` in innodbcluster resource mysqloperator creates cronjob with job/pod template.

Backup process is:
cronjob-cb -> job -> pod -> create mysqlbackup -> job (backup) -> pod (exectues backup)

mysqlbackup - related job/pod stays there forever no autodeletion.

At node replacement, all backup pods are triggered again at the time of node replacement. At the time of node replacement database had values X and all pods copied data from the time of node replacement to old directories which means they were overwriting older backups with newer data values.

How to repeat:
`backupProfile/backupSchedules/ storage PVC`

keep mysqlbackup resources (5 of them)
trigger node replacement and observe which jobs/pods will execute again

Suggested fix:
Remove mysqlbackup resources after completed succesfully
[8 Nov 2022 15:58] MySQL Verification Team
thanks for the report