title | summary | category |
---|---|---|
Configuration of tidb-backup Chart |
Learn the configurations of the tidb-backup chart. |
reference |
tidb-backup
is a helm chart used for backing up and restoring TiDB clusters in Kubernetes. This document describes the configuration of tidb-backup
.
Note:
For TiDB Operator v1.1 and later versions, it is recommended not to use the tidb-backup chart to deploy and manage the TiDB cluster backup. For details, refer to Notes for TiDB Operator v1.1.
- The operating mode
- Default: "backup"
- Options:
backup
(for backing up the data of a cluster) orrestore
(for restoring the data of a cluster)
- 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
- The name of the backup
- Default: "fullbackup-{{ date "200601021504" .Release.Time }}".
date
is the starting time of the backup, which is accurate to minute.
-
The name of the
Secret
which stores the credential of the target cluster. See Kubernetes Secret for reference. -
Default: "backup-secret"
-
You can create the
Secret
by running the following command:{{< copyable "shell-regular" >}}
kubectl create secret generic backup-secret -n ${namespace} --from-literal=user=root --from-literal=password=${password}
- 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
StorageClass
is available in your Kubernetes cluster.
- The storage size of the Persistence Volume
- Default: "100Gi"
- The optional parameter specified to
mydumper
used when backing up data - Default: "--chunk-filesize=100"
- The optional parameter specified to
loader
used when backing up data - Default: "-t 16"
- The name of the GCP bucket used to store backup data
- Default: ""
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.
-
The name of the
Secret
that stores the credential of Google Cloud Storage -
Default: ""
-
See Google Cloud Documentation to download the credential file and create the
Secret
by the running following command:{{< copyable "shell-regular" >}}
kubectl create secret generic gcp-backup-secret -n ${namespace} --from-file=./credentials.json
- The endpoint of the
ceph
object storage - Default: ""
Note:
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.
- The bucket name of the
ceph
object storage - Default: ""
-
The name of the
Secret
that stores the credential of theceph
object store -
Default: ""
-
You can create the
Secret
by running the following command:{{< copyable "shell-regular" >}}
kubectl create secret generic ceph-backup-secret -n ${namespace} --from-literal=access_key=${access_key} --from-literal=secret_key=${secret_key}