Backup Retention policy

Description:

My Backups retention policy doesn’t seem to delete any backup, whilst it should only keep a few of them, backups are stored up to the creation of the cluster

Steps to Reproduce:

spec:
  backup:
    enabled: true
    image: percona/percona-backup-mongodb:2
    storages:
      s3-backup:
        main: true
        s3:
          bucket: backups
          credentialsSecret: s3-credentials
          endpointUrl: s3endpoint
          region: us-east-1 # is unused, but percona backup fails if not specified
        type: s3
    tasks:
      - enabled: true
        retention:
          deleteFromStorage: true
          type: count
          count: 14
        name: daily-backup
        schedule: 0 2 * * *
        type: incremental-base
        storageName: s3-backup
      - enabled: true
        retention:
          deleteFromStorage: true
          type: count
          count: 12
        name: hourly-backup
        schedule: "0 * * * *"
        type: incremental
        storageName: s3-backup
      - enabled: true
        retention:
          deleteFromStorage: true
          type: count
          count: 4
        name: weekly-full-backup
        schedule: "0 0 * * 0"
        type: logical
        storageName: s3-backup
  image: percona/percona-server-mongodb:8.0
  replsets:
    - name: rs0
      size: 3
      volumeSpec:
        persistentVolumeClaim:
          resources:
            requests:
              storage: 10Gi
  users:
    - name: user
      roles:
        - db: db
          name: dbOwner
  secrets:
    users: db


## Version:
Percona operator: 1.21.2 (Helm chart)
## Logs:
I am not sure were to find those logs, I vaguely remember to have seen a k8s event stating "retention policy failed" horever it is long gone, is there a way to trigger the policy manually, so I could check for errors?

are there any updates on this?

@schlaubi Incremental backups don’t support this retention field. They won’t be cleaned up. But logical backup should be cleaned up. I need more information to provide any help. There should be something in the operator container logs.

P.S.: I created K8SPSMDB-1568 to document retention section properly.

Is it planned to cleanup incremental backups as well?