How to disable log backups when using BackupSchedule with K8s?

Hey TiDB folks,

I want to use BackupSchedule with K8s, but I don’t want log backups; snapshot backups are enough.
However, the BackupSchedule definition requires that logBackupTemplate be defined.

So, how can I schedule just snapshot backups and not log backups?

Thanks!

For reference, here’s what I’d like to be able to write:

apiVersion: pingcap.com/v1alpha1
kind: BackupSchedule
metadata:
  name: backup-schedule
  namespace: tidb-cluster
spec:
  schedule: "0 */4 * * *"
  pause: false
  maxBackups: 8
  backupTemplate:
    cleanPolicy: Delete
    br:
      cluster: basic
      clusterNamespace: tidb-cluster
      sendCredToTikv: true
    s3:
      provider: aws
      region: us-west-2
      secretName: s3-secret
      bucket: bagel-tidb
      prefix: backup-full
      storageClass: INTELLIGENT_TIERING
  # logBackupTemplate is not defined.

You can check the scheduled-snapshot-backup part in doc for S3-Compatible Storage.

If you use other storage, please check

Thanks for the response!

I think there’s probably a bug in TiDB Operator.

When I try to schedule backups as described here I get the error The BackupSchedule "demo1-backup-schedule-s3" is invalid: spec.logBackupTemplate: Required value.

For example:

As you can see, the Operator expects logBackupTemplate to be defined, so the example in the docs appears to be broken.

I can reproduce this, let me confirm and reply you later.

hi emchristiansen

we confirm this issue is introduced in PR 4904 in Operator v1.4.4 new feature, current workaround is turn back to use Operator v1.4.3 & CRD v1.4.3, or you can wait Operator v1.5.0 or v1.4.5 release which will fix this.

I think I’ll just wait for the next release.

Thanks for your help!