Configuration of tidb-backup Chart
tidb-backup is a helm chart used for backing up and restoring TiDB clusters in Kubernetes. This document describes the configuration of tidb-backup.
Configuration
mode
- The operating mode
- Default: "backup"
- Options:
backup(for backing up the data of a cluster) orrestore(for restoring the data of a cluster)
clusterName
- The name of the target cluster
- Default: "demo"
- The name of the TiDB cluster from which data is backed up or to which data is restored
name
- The name of the backup
- Default:
"fullbackup-{{ date "200601021504" .Release.Time }}".dateis the starting time of the backup, which is accurate to minute.
secretName
The name of the
Secretwhich stores the credential of the target cluster. See Kubernetes Secret for reference.Default: "backup-secret"
You can create the
Secretby running the following command:kubectl create secret generic backup-secret -n ${namespace} --from-literal=user=root --from-literal=password=${password}
storage.className
- The StorageClass is used to store backup data.
- Default: "local-storage"
- The backup job needs a Persistent Volume (PV) to store the backup data. You must ensure that
StorageClassis available in your Kubernetes cluster.
storage.size
- The storage size of the Persistence Volume
- Default: "100Gi"
backupOptions
- The optional parameter specified to
mydumperused when backing up data - Default: "--chunk-filesize=100"
restoreOptions
- The optional parameter specified to
loaderused when backing up data - Default: "-t 16"
gcp.bucket
- The name of the GCP bucket used to store backup data
- Default: ""
gcp.secretName
The name of the
Secretthat stores the credential of Google Cloud StorageDefault: ""
See Google Cloud Documentation to download the credential file and create the
Secretby the running following command:kubectl create secret generic gcp-backup-secret -n ${namespace} --from-file=./credentials.json
ceph.endpoint
- The endpoint of the
cephobject storage - Default: ""
ceph.bucket
- The bucket name of the
cephobject storage - Default: ""
ceph.secretName
The name of the
Secretthat stores the credential of thecephobject storeDefault: ""
You can create the
Secretby 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}