Bug #113152 MySQL Operator Scheduled Backup Example Documentation Incorrect
Submitted: 20 Nov 2023 19:39 Modified: 28 Nov 2023 20:36
Reporter: Eldin Didic (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Operator Severity:S3 (Non-critical)
Version: OS:Any
Assigned to: CPU Architecture:Any

[20 Nov 2023 19:39] Eldin Didic
Description:
https://dev.mysql.com/doc/mysql-operator/en/mysql-operator-backups.html

The documentations first example is incorrect, a direct copy and paste will result in an error and research into the error will be required if not familiar with the MySQL Operators's CRD in order to fix.

The indentation of the backupSchedule field in the example provided is nested under the dumpInstance field - this is incorrect, the property should reside directly under the spec field.

How to repeat:
Copy the spec as is in the current example and attempt deployment

Suggested fix:
apiVersion: mysql.oracle.com/v2
kind: InnoDBCluster
metadata:
  name: mycluster
spec:
  instances: 3
  router:
    instances: 1
  secretName: mypwds
  tlsUseSelfSigned: true
  backupProfiles:       
  - name: myfancyprofile  # Embedded backup profile
    dumpInstance:         # MySQL Shell Dump
      dumpOptions:
        excludeTables: "[world.country]" # Example to exclude one table 
      storage:
        persistentVolumeClaim:
          claimName: myexample-pvc # store to this pre-existing PVC
  backupSchedules:
    - name: mygreatschedule
      schedule: "0 0 * * *" # Daily, at midnight
      backupProfileName:  myfancyprofile # reference the desired backupProfiles's name 
      enabled: true # backup schedules can be temporarily disabled
[22 Nov 2023 21:01] MySQL Verification Team
Thank you for report
[28 Nov 2023 20:36] Philip Olson
Posted by developer:
 
Thank you Eldin for reporting this, it's now fixed in the source and the change will show up online within an hour or three.