BackupSchedule fails to run

Hey TiDB folks,

Can I get help debugging a BackupSchedule that fails to run?

To create the BackupSchedule, I first started with a Backup config that works on my cluster.

Then I created a BackupSchedule and copy-pasted my config into the backupTemplate and logBackupTemplate fields, though I changed the destination bucket for the logBackupTemplate.
Here it is.
IIUC, this should work, because those fields use the Backup CRD.

When I apply this, I get these errors from the controller manager.

Any idea what’s going on?
It seems to maybe have something to do with storage.


What versions do the tidb-operator and tidb-cluster use? Do you upgrade them recently?

Sorry for the delay - I was traveling.

I created the CRDs using this command, run a couple days ago:

kubectl create -f \

My ClusterConfig specifies version 6.5.0.

Does that tell you what you need to know?

EDIT: I just noticed I’m using master and not a release branch. Let me try it with v1.4.4 and get back to you.

I just deleted and recreated the cluster and setup TiDB with these commands:

kubectl create -f \

helm install \
  --namespace tidb-admin --create-namespace \
  tidb-operator pingcap/tidb-operator \
  --version v1.4.4

wget \ \
  -O k8s/backup-rbac.yaml
kubectl apply -f k8s/backup-rbac.yaml -n tidb-cluster

kubectl -n tidb-cluster apply -f k8s/tidb-cluster.yaml

Here is tidb-cluster.yaml.

The errors are the same as before.
Here’s a fresh sample.

A small bug here, pls add kv pair “backupMode: log” to “logBackupTemplate” as a workaround.

Thank you!

That works, but it’s not deleting old backups.

Here’s the backup folder:

Here’s the log backup folder:

pls set backupTemplate.spec.cleanPolicy to “Delete”

That didn’t work - old backups still aren’t being deleted.
Also, if I’m reading this correctly cleanPolicy only applies when the CR is deleted.

Any more ideas?

(Sorry for the long lag, I’ve been traveling.)

set backupTemplate.spec.cleanPolicy to “Delete” only works for new backup, for the old one, you have to do manual cleanup