Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TiDB Cloud Docs: Add documentation for new Recovery Group feature #17425

Merged
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions TOC-tidb-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@
- [To Kafka Sink](/tidb-cloud/changefeed-sink-to-apache-kafka.md)
- [To TiDB Cloud Sink](/tidb-cloud/changefeed-sink-to-tidb-cloud.md)
- [To Cloud Storage](/tidb-cloud/changefeed-sink-to-cloud-storage.md)
- Disaster Recovery
- [Recovery Group Overview](/tidb-cloud/recovery-group-overview.md)
- [Get Started](/tidb-cloud/recovery-group-get-started.md)
- [Failover and Reprotect Databases](/tidb-cloud/recovery-group-failover.md)
- [Delete Recovery Group](/tidb-cloud/recovery-group-delete.md)
hfxsd marked this conversation as resolved.
Show resolved Hide resolved
- Security
- Identity Access Control
- [Password Authentication](/tidb-cloud/tidb-cloud-password-authentication.md)
Expand Down Expand Up @@ -283,6 +288,7 @@
- [Billing from AWS or GCP Marketplace](/tidb-cloud/tidb-cloud-billing.md#billing-from-aws-marketplace-or-google-cloud-marketplace)
- [Billing for Changefeed](/tidb-cloud/tidb-cloud-billing-ticdc-rcu.md)
- [Billing for Data Migration](/tidb-cloud/tidb-cloud-billing-dm.md)
- [Billing for Recovery Groups](/tidb-cloud/tidb-cloud-billing-recovery-group.md)
- API
- API
- [API Overview](/tidb-cloud/api-overview.md)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions tidb-cloud/recovery-group-delete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: Delete Recovery Group
hfxsd marked this conversation as resolved.
Show resolved Hide resolved
summary: Learn how to delete a Recovery Group when it is no longer needed
hfxsd marked this conversation as resolved.
Show resolved Hide resolved
---

# Delete Recovery Group
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

When a Recovery Group is no longer needed it may be deleted.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

## Delete a Recovery Group

When a recovery group is no longer needed to manage the replication of a set of databases it may be deleted form the system.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

1. In the TiDB Cloud console, click **Project Settings** in the left navigation pane.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

2. On the project settings navigation pane, click **Recovery Group**.

3. On the recovery group page, click the name of the recovery group that you wish to delete.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

4. Click the action menu for the recovery group, and click **Delete**. The failover dialog will open.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

> **Warning**
>
> - Deleting a Recovery Group also removes any of the associated replication relationship that were associated with that Recovery Group.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved
> - The databases associated with the Recovery Group are no longer protected against disaster.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

5. Confirm that you understand the impacting of the deletion by typing the name of the recovery group and clicking **I understand, delete it** to delete the recovery group.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

hfxsd marked this conversation as resolved.
Show resolved Hide resolved
77 changes: 77 additions & 0 deletions tidb-cloud/recovery-group-failover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
title: Failover and Reprotect Databases
summary: Learn how to use a Recovery Group to Failover and Reprotect databases between TiDB Cloud clusters
hfxsd marked this conversation as resolved.
Show resolved Hide resolved
---

# Failover and Reprotect Databases

Databases that are part of a replication group are replicated from one cluster to another (typically in a different region of the cloud service provider).

The **Failover** action promotes the replicated copy of the databases at the secondary region to be the new primary copy. Ensuring ongoing availability in the event of a regional outage.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

When the regional outage has concluded, the ability to reverse the replication from the recovery region back to the original region is done using the **Reprotect** action. This ensures that the databases are protected against future disasters impacting their new region, and prepares them for migration back to the original region if desired.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

## Prerequisites

Prior to performing a failover, the Recovery Group should have been created and be successfully replicating to the secondary cluster. See [Get Started with Recovery Groups](/tidb-cloud/recovery-group-get-started.md)
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

![Protected Recovery Group](/media/tidb-cloud/recovery-group/recovery-group-protected.png)

## Failover Databases using Recovery Group
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

In the event of a disaster the recovery group is used to fail over databases to the secondary cluster.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

1. In the TiDB Cloud console, click **Project Settings** in the left navigation pane.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

2. On the project settings navigation pane, click **Recovery Group**.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

3. On the recovery group page, click the name of the recovery group that you wish to failover.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

4. Click the action menu for the recovery group, and click **Failover**. The failover dialog will open.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

> **Warning**
>
> Performing a failover will sever the existing replication relationship.

5. Select the secondary TiDB Cloud cluster that will be promoted to the primary copy. Ensure that the selected cluster is in a healthy state.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

6. Confirm that you understand the potentially disruptive nature of a failover by typing **Failover** into the confirmation entry and clicking **I understand, Failover Group** to begin the failover.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

![Fail Over Recovery Group](/media/tidb-cloud/recovery-group/recovery-group-failover.png)

## Reprotect Databases using Recovery Group
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

After a failover completes, the replica databases on the secondary cluster are now the primary copy. However, these databases are unprotected against future disasters as the replication relationship is stopped by the failover process.

If the cluster that was impacted by the disaster is able to be brought online again, a replication relationship from the recovery region back to the original region can be established. This is performed using the **Reprotect** action.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

![Unprotected Recovery Group](/media/tidb-cloud/recovery-group/recovery-group-unprotected.png)
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

1. In the TiDB Cloud console, click **Project Settings** in the left navigation pane.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

2. On the project settings navigation pane, click **Recovery Group**.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

3. On the recovery group page, click the name of the recovery group that you wish to reprotect.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

> **Note**
hfxsd marked this conversation as resolved.
Show resolved Hide resolved
>
> The **Recovery Group Detail** page provides information about the recovery group including current status and replication topology.
> During the reprotect synchronization, due to the volume of data transferred, the online query performance at the primary or secondary clusters may be affected. Schedule the reprotection of databases for a less busy period.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

> **Warning**
>
> As part of the data replication necessary to perform the reprotect operation, the content of the selected databases will be replaced at the target cluster by the content of the databases from the (new) primary cluster. If you wish to preserve the unique content on the target cluster please complete a backup before performing the Reprotect operation.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

4. Click the action menu for the recovery group, and click **Reprotect**. The reprotect dialog will open.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

5. Confirm the reprotect operation by clicking **I understand, Failover Group** to begin the reprotect operation.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

![Reprotect Recovery Group](/media/tidb-cloud/recovery-group/recovery-group-reprotected.png)

## What's next

After creating the recovery group you may want to familiarize yourself with the failover and reprotect operations. These operations are used to (1) **Failover** the primary cluster for the replicated databases from one cluster to the other, and then to later (2) reestablish replication in the opposite direction to **Reprotect** the failed over databases.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

- [Failover Databases](/tidb-cloud/recovery-group-failover.md)
- [Reprotect Databases](/tidb-cloud/recovery-group-reprotect.md)
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

hfxsd marked this conversation as resolved.
Show resolved Hide resolved
79 changes: 79 additions & 0 deletions tidb-cloud/recovery-group-get-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
title: Get Started with Recovery Groups
summary: Learn how to create a Recovery Group in TiDB Cloud and view its details
hfxsd marked this conversation as resolved.
Show resolved Hide resolved
---

# Get Started with Recovery Groups

This document describes how to create a Recovery Group to protect your databases running on TiDB Cloud Dedicated Clusters using the TiDB Cloud user interface. It also shows how to view details of the recovery group.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

## Prerequisites
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

Recovery Groups replicate your databases to another cluster to protect your databases from a regional disaster. To create a recovery group you will need to have two TiDB Cloud Dedicated Clusters, one where the databases are primarily located, and a second cluster that will be used for the replicated copy of the databases. If you have not done so already, follow the steps in [Create a TiDB Dedicated Cluster](/tidb-cloud/create-tidb-cluster.md) to create the necessary clusters.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

qiancai marked this conversation as resolved.
Show resolved Hide resolved
> **Note**
>
> TiDB Cloud Recovery Groups are currently supported with TiDB Cloud Dedicated Cluster deployed on AWS
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

## Create a new Recovery Group
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

To create a Recovery Group, perform the following steps:
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

1. In the TiDB Cloud console, click **Project Settings** in the left navigation pane.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

2. On the project settings navigation pane, click **Recovery Group**.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

3. On the recovery group page, click **Create Recovery Group**. A dialog is displayed.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

4. In the Create Recovery Group Dialog enter a name for the recovery group.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

> **Note**
>
> Currently only one resiliency level is supported.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

5. Select the TiDB Cloud cluster that will be the primary cluster for this group.

6. Select the TiDB Cloud cluster that will be the seondary cluster that databases will be replicated to for this group.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

7. Select which databases you wish to replicate as part of this recovery group.

> **Note**
hfxsd marked this conversation as resolved.
Show resolved Hide resolved
>
> When assigning databases to the group you can select specific databases to the recovery group, or select all (non-system) databases on the primary cluster (current and future).
hfxsd marked this conversation as resolved.
Show resolved Hide resolved
> If you **Assign all databases (current and future)** then any future databases added to the cluster will be automatically included in this recovery group and replicated to the secondary cluster.
> If you **Assign specific databases** then you will select the specific databases on the primary cluster that you want to replicate to the secondary cluster. If any databases are added to the primary cluster in the future, then these will not be automatically replicated as part of this recovery group.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved
> During the initial synchronization, due to the volume of data transferred, the online query performance at the primary or secondary clusters may be affected. Schedule the initial protection of databases for a less busy period.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

> **Warning**
>
> As part of the initial data replication, the content of the selected databases will be replaced at the secondary cluster by the content of the databases from the primary cluster. If you wish to preserve the unique content on the secondary cluster please complete a backup before completing the setup of the the Recovery Group.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

8. Review the summary information and click **Create** to begin protecting the databases as part of a new Recovery Group.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

## View Recovery Group Details
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

After creating a Recovery Group, view the **Recovery Group Detail** page to view status information about the group:
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

1. In the TiDB Cloud console, click **Project Settings** in the left navigation pane.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

2. On the project settings navigation pane, click **Recovery Group**.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

3. On the recovery group page, click the name of the recovery group that you wish to view.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

> **Note**
>
> The **Recovery Group Detail** page provides information about the recovery group including the configuration details provided when it was created, and its current status.
> The page also provides metrics on the throughput of the recovery groups replication, and the replication latency experienced.

4. The status of the Recovery Group will read as **Available** when the replication relationship is fully established and functioning.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. The status of the Recovery Group will read as **Available** when the replication relationship is fully established and functioning.
4. The status of the recovery group will read as **Available** when the replication relationship is fully established and functioning.


> **Warning**
>
> As part of the setup of a Recovery Group, an account will be created on the secondary cluster that will be used by the replication process. This account will be named following the pattern `cloud-rg-*`. Deleting or modifying this account will cause the replication to be interrupted.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> As part of the setup of a Recovery Group, an account will be created on the secondary cluster that will be used by the replication process. This account will be named following the pattern `cloud-rg-*`. Deleting or modifying this account will cause the replication to be interrupted.
> As part of the setup of a recovery group, an account will be created on the secondary cluster that will be used by the replication process. This account will be named following the pattern `cloud-rg-*`. Deleting or modifying this account will cause the replication to be interrupted.


qiancai marked this conversation as resolved.
Show resolved Hide resolved
## What's next

After creating the recovery group you may want to familiarize yourself with the failover and reprotect operations. These operations are used to (1) **Failover** the primary cluster for the replicated databases from one cluster to the other, and then to later (2) reestablish replication in the opposite direction to **Reprotect** the failed over databases.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
After creating the recovery group you may want to familiarize yourself with the failover and reprotect operations. These operations are used to (1) **Failover** the primary cluster for the replicated databases from one cluster to the other, and then to later (2) reestablish replication in the opposite direction to **Reprotect** the failed over databases.
After creating the recovery group, you might want to familiarize yourself with the failover and reprotect operations. These operations are used to **Failover** the primary cluster for the replicated databases from one cluster to the other, and then to later reestablish replication in the opposite direction to **Reprotect** the failed over databases.


- [Failover and Reprotect Databases](/tidb-cloud/recovery-group-failover.md)

hfxsd marked this conversation as resolved.
Show resolved Hide resolved
37 changes: 37 additions & 0 deletions tidb-cloud/recovery-group-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: Recovery Group Overview (Beta)
summary: Learn how to protect your databases against disasters by using TiDB Cloud Recovery Groups.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
summary: Learn how to protect your databases against disasters by using TiDB Cloud Recovery Groups.
summary: Learn how to protect your databases against disasters by using TiDB Cloud recovery groups.

---

# Recovery Group Overview (Beta)

TiDB Cloud Recovery Groups allow you to replicate your databases between TiDB Cloud Dedicated clusters for protection against regional disasters. Recovery Groups allow you to orchestrate the failover of databases from one cluster to another. After failover to the secondary cluster, if the original cluster becomes available again, you can re-establish replication in the reverse direction to reprotect the databases.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TiDB Cloud Recovery Groups allow you to replicate your databases between TiDB Cloud Dedicated clusters for protection against regional disasters. Recovery Groups allow you to orchestrate the failover of databases from one cluster to another. After failover to the secondary cluster, if the original cluster becomes available again, you can re-establish replication in the reverse direction to reprotect the databases.
A TiDB Cloud recovery group allows you to replicate your databases between TiDB Cloud Dedicated clusters for protection against regional disasters. You can orchestrate the failover of databases from one cluster to another. After failover to the secondary cluster, if the original cluster becomes available again, you can re-establish replication in the reverse direction to reprotect the databases.


## Architecture

A Recovery Group consists of a set of replicated databases that can be failed over together between two TiDB Dedicated Clusters. Each Recovery Group is assigned a primary cluster, databases on this primary cluster are associated with the group and are then replicated to the secondary cluster.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A Recovery Group consists of a set of replicated databases that can be failed over together between two TiDB Dedicated Clusters. Each Recovery Group is assigned a primary cluster, databases on this primary cluster are associated with the group and are then replicated to the secondary cluster.
A recovery group consists of a set of replicated databases that can be failed over together between two TiDB Dedicated clusters. Each recovery group is assigned a primary cluster, databases on this primary cluster are associated with the group and are then replicated to the secondary cluster.


![Recovery Group](/media/tidb-cloud/recovery-group/recovery-group-overview.png)

- Recovery Group: a group of databases that are replicated between two clusters
- Primary Cluster: the cluster where the database is actively written by the application
- Secondary Cluster: the cluster where replicas of the database are located
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

> **Note**
>
> Client connections to the replica copy of the database are not explicitly forced to be read-only by the Recovery Group feature. Ensuring that the application connecting to the replica copy only performs read-only queries is the responsibility of the application.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

## Key features/Limitations
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Key features/Limitations
## Key features and limitations


- Recovery Groups support TiDB Cloud Dedicated Clusters that are deployed on AWS.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Recovery Groups support TiDB Cloud Dedicated Clusters that are deployed on AWS.
- Currently only TiDB Cloud Dedicated clusters that are deployed on AWS support recovery groups.

- Recovery Groups are established between two clusters.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Recovery Groups are established between two clusters.
- Recovery groups are established between two clusters.

- Bi-directional replication of a database is not supported with recovery groups.

> **Warning**
>
> This feature is a beta feature and not recommended for product environments.
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

## What's next

- To get started with recovery groups, see [Create Database Recovery Group](/tidb-cloud/recovery-group-get-started.md).
- To learn how to use a recovery group, see [Failover Databases](/tidb-cloud/recovery-group-failover.md) and [Reprotect Databases](/tidb-cloud/recovery-group-reprotect.md)
hfxsd marked this conversation as resolved.
Show resolved Hide resolved
12 changes: 12 additions & 0 deletions tidb-cloud/tidb-cloud-billing-recovery-group.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Recovery Group Billing
summary: Learn about billing for recovery groups in TiDB Cloud.
---

# Recovery Group Billing

TiDB Cloud bills for Recovery Groups based on the deployed size of the TiKV cluster that is the primary cluster in the Recovery Group. When you [create a recovery group](/tidb-cloud/changefeed-overview.md#create-a-changefeed) for a cluster, you can select the primary cluster that the recovery group will be associated with. The larger the TiKV configuration, the higher the cost for Recovery Group protection.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TiDB Cloud bills for Recovery Groups based on the deployed size of the TiKV cluster that is the primary cluster in the Recovery Group. When you [create a recovery group](/tidb-cloud/changefeed-overview.md#create-a-changefeed) for a cluster, you can select the primary cluster that the recovery group will be associated with. The larger the TiKV configuration, the higher the cost for Recovery Group protection.
TiDB Cloud bills for recovery groups based on the deployed size of the TiKV cluster that is the primary cluster in the recovery group. When you [create a recovery group](/tidb-cloud/recovery-group-get-started.md) for a cluster, you can select the primary cluster that the recovery group will be associated with. The larger the TiKV configuration, the higher the cost for recovery group protection.


## Price

To learn about the supported regions and the price of TiDB Cloud for each Recovery Group, see [Recovery Group Cost](https://www.pingcap.com/tidb-cloud-pricing-details/#recovery-group-cost).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To learn about the supported regions and the price of TiDB Cloud for each Recovery Group, see [Recovery Group Cost](https://www.pingcap.com/tidb-cloud-pricing-details/#recovery-group-cost).
To learn about the supported regions and the price of TiDB Cloud for each recovery group, see [Recovery Group Cost](https://www.pingcap.com/tidb-cloud-pricing-details/#recovery-group-cost).

Loading