forked from pingcap/docs-tidb-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
en: reorg the disaster recovery part (pingcap#467)
Co-authored-by: DanielZhangQD <[email protected]>
- Loading branch information
1 parent
301d21d
commit fbc92a8
Showing
3 changed files
with
36 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
title: Recover the Deleted Cluster | ||
summary: Learn how to recover a TiDB cluster that has been deleted mistakenly. | ||
category: how-to | ||
--- | ||
|
||
# Recover the Deleted Cluster | ||
|
||
This document describes how to recover a TiDB cluster that has been deleted mistakenly. | ||
|
||
## Recover the cluster managed by TidbCluster | ||
|
||
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" >}} | ||
|
||
```shell | ||
kubectl -n ${namespace} create -f tidb-cluster.yaml | ||
``` | ||
|
||
## Recover the cluster managed by Helm | ||
|
||
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" >}} | ||
|
||
```shell | ||
helm install pingcap/tidb-cluster -n ${release_name} --namespace=${namespace} --version=${chart_version} -f values.yaml | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters