title | summary | aliases | |
---|---|---|---|
Recover the Deleted Cluster |
Learn how to recover a TiDB cluster that has been deleted mistakenly. |
|
This document describes how to recover a TiDB cluster that has been deleted mistakenly.
TiDB Operator uses PV (Persistent Volume) and PVC (Persistent Volume Claim) to store persistent data. If you accidentally delete a cluster using kubectl delete tc
, the PV/PVC objects and data are still retained to ensure data safety.
To recover the deleted cluster, use the kubectl create
command to create a cluster that has the same name and configuration as the deleted one. In the new cluster, the retained PV/PVC and data are reused.
{{< copyable "shell-regular" >}}
kubectl -n ${namespace} create -f tidb-cluster.yaml
TiDB Operator uses PV (Persistent Volume) and PVC (Persistent Volume Claim) to store persistent data. If you accidentally delete a cluster using helm delete
, the PV/PVC objects and data are still retained to ensure data safety.
To recover the cluster at this time, use the helm install
command to create a cluster that has the same name and configuration as the deleted one. In the new cluster, the retained PV/PVC and data are reused.
{{< copyable "shell-regular" >}}
helm install pingcap/tidb-cluster -n ${release_name} --namespace=${namespace} --version=${chart_version} -f values.yaml