Backups are disabled and yet they keep creating

Hi , i use velero to create backups of pv and pvc’s … this topic is of two questions :

  1. Will velero suffice to restore backups of percona ?
  2. i have disabled backups via operator values.yaml.
kubectl describe pxc
    Enabled:  false
    Image:    percona/percona-xtradb-cluster-operator:1.7.0-pxc5.7-backup
      Enabled:  false
      Keep:          5
      Name:          daily-backup
      Schedule:      0 0 * * *
      Storage Name:  fs-pvc
      Fs - Pvc:
        Type:  filesystem
          Persistent Volume Claim:
            Access Modes:
                Storage:  6Gi
  Cr Version:             1.7.0


kubectl describe psmdb
    Enabled:               false
    Image:                 percona/percona-server-mongodb-operator:1.6.0-backup
    Restart On Failure:    true
    Service Account Name:  percona-server-mongodb-operator
    Storages:              <nil>
    Tasks:                 <nil>
  Image:                   percona/percona-server-mongodb:3.6.21-10.0
  Image Pull Policy:       Always

i stripped some lines to make it compact

kubectl get pods 
NAME                                                     READY   STATUS      RESTARTS   AGE
daily-backup-1617062400-fwm5j                            0/1     Completed   0          5h51m
mongo-op-psmdb-operator-55c986b756-zwbdp                 1/1     Running     0          12d
mongo-psmdb-db-rs0-0                                     1/1     Running     0          7d19h
mongo-psmdb-db-rs0-1                                     1/1     Running     0          7d19h
mongo-psmdb-db-rs0-2                                     1/1     Running     0          7d20h
mysql-op-pxc-operator-769b79f4b6-t4nph                   1/1     Running     0          12d
mysql-pxc-db-haproxy-0                                   2/2     Running     0          12d
mysql-pxc-db-haproxy-1                                   2/2     Running     0          12d
mysql-pxc-db-haproxy-2                                   2/2     Running     0          12d
mysql-pxc-db-pxc-0                                       3/3     Running     0          12d
mysql-pxc-db-pxc-1                                       3/3     Running     0          12d
mysql-pxc-db-pxc-2                                       3/3     Running     0          12d
xb-cron-mysql-pxc-db-fs-pvc-20210326000006-372f8-ghtr8   0/1     Completed   0          4d5h
xb-cron-mysql-pxc-db-fs-pvc-20210327000005-372f8-8k45j   0/1     Completed   0          3d5h
xb-cron-mysql-pxc-db-fs-pvc-20210328000013-372f8-xh2w5   0/1     Completed   0          2d5h
xb-cron-mysql-pxc-db-fs-pvc-20210329000004-372f8-x5s8g   0/1     Completed   0          29h
xb-cron-mysql-pxc-db-fs-pvc-20210330000008-372f8-kknsj   0/1     Completed   0          5h50m

Any clues ?

1 Like

Hello @favas ,

  1. I have not tested velero. Is it taking the backup of the Custom Resources as well?
    If so, it might work.
    One thing I would be careful with is the restoration and data consistency of the PVCs. If Velero is not locking the database before taking the backup it might lead to data loss or data inconsistency.

  2. Actually we don’t have the disable flag in cr.yaml. To disable the backups, you can just comment out the whole backup section or schedule.
    In Helm we have this option and it was fixed just recently: Issue K8SPXC-620 in jira. Backup cronjobs created for disabled backups by kapil40 · Pull Request #56 · percona/percona-helm-charts · GitHub