tidb-backup
is a helm chart used for backing up and restoring TiDB clusters in Kubernetes. This document describes the configuration of tidb-backup
.
mode
backup
(for backing up the data of a cluster) or restore
(for restoring the data of a cluster)clusterName
name
date
is the starting time of the backup, which is accurate to minute.secretName
Secret
which stores the credential of the target cluster. See Kubernetes Secret for reference.You can create the Secret
by running the following command:
kubectl create secret generic backup-secret -n <namespace> --from-literal=user=root --from-literal=password=<password>
storage.className
StorageClass
is available in your Kubernetes cluster.storage.size
backupOptions
mydumper
used when backing up datarestoreOptions
loader
used when backing up datagcp.bucket
Note:
Once you set any variable under the
gcp
section, the backup data will be uploaded to Google Cloud Storage, which means that you must keep the configuration intact.
gcp.secretName
Secret
that stores the credential of Google Cloud StorageSee Google Cloud Documentation to download the credential file and create the Secret
by the running following command:
kubectl create secret generic gcp-backup-secret -n <namespace> --from-file=./credentials.json
ceph.endpoint
ceph
object storageNote:
Once you set any variable under the
ceph
section, the backup data will be uploaded to theceph
object storage, which means that you must keep the configuration intact.
ceph.bucket
ceph
object storageceph.secretName
Secret
that stores the credential of the ceph
object storeYou can create the Secret
by running the following command:
kubectl create secret generic ceph-backup-secret -n <namespace> --from-literal=access_key=<access-key> --from-literal=secret_key=<secret-key>