From 36f34236b40207fe1d6769fd2521ceff1464f0d5 Mon Sep 17 00:00:00 2001 From: shi yuhang <52435083+shiyuhang0@users.noreply.github.com> Date: Tue, 17 Dec 2024 18:01:27 +0800 Subject: [PATCH] serverless BR (#19679) --- tidb-cloud/backup-and-restore-serverless.md | 114 ++++++++++++++------ tidb-cloud/delete-tidb-cluster.md | 2 +- tidb-cloud/tidb-cloud-poc.md | 2 +- 3 files changed, 84 insertions(+), 34 deletions(-) diff --git a/tidb-cloud/backup-and-restore-serverless.md b/tidb-cloud/backup-and-restore-serverless.md index 9cea220a344a8..de789e78e9ee4 100644 --- a/tidb-cloud/backup-and-restore-serverless.md +++ b/tidb-cloud/backup-and-restore-serverless.md @@ -12,46 +12,77 @@ This document describes how to back up and restore your TiDB Cloud Serverless cl > > To learn how to back up and restore TiDB Cloud Dedicated cluster data, see [Back Up and Restore TiDB Cloud Dedicated Data](/tidb-cloud/backup-and-restore.md). -## Limitations +## Automatic backups + +TiDB Cloud Serverless automatically backs up your cluster data, allowing you to restore data from a backup snapshot to minimize data loss in the event of a disaster. + +### Learn about the backup setting + +Automatic backup settings vary between free clusters and scalable clusters, as shown in the following table: -- It is important to note that TiDB Cloud Serverless clusters only support in-place restoring from backups. When a restore is performed, tables in the `mysql` schema are also impacted. Hence, any changes made to user credentials and permissions or system variables will be rolled back to the state when the backup was taken. -- Manual backup is not yet supported. -- The cluster will be unavailable during the restore process, and existing connections will be terminated. You can establish new connections once the restore is complete. -- If any TiFlash replica is enabled, the replica will be unavailable for a while after the restore because data needs to be rebuilt in TiFlash. +| Backup setting | Free clusters | Scalable clusters | +|------------------|--------------|------------------| +| Backup Cycle | Daily | Daily | +| Backup Retention | 1 day | 14 days | +| Backup Time | Fixed time | Configurable | -## Backup +- **Backup Cycle** is the frequency at which backups are taken. -Automatic backups are scheduled for your TiDB Cloud Serverless clusters according to the backup setting, which can reduce your loss in extreme disaster situations. +- **Backup Retention** is the duration for which backups are retained. Expired backups cannot be restored. + +- **Backup Time** is the time when the backup starts to be scheduled. Note that the final backup time might fall behind the configured backup time. + + - Free clusters: the backup time is a randomly fixed time. + - Scalable clusters: you can configure the backup time to every half an hour. The default value is a randomly fixed time. -### Automatic backup +### Configure the backup setting -By the automatic backup, you can back up the TiDB Cloud Serverless cluster data every day at the backup time you have set. To set the backup time, perform the following steps: +To set the backup time for a scalable cluster, perform the following steps: 1. Navigate to the **Backup** page of a TiDB Cloud Serverless cluster. 2. Click **Backup Settings**. This will open the **Backup Settings** window, where you can configure the automatic backup settings according to your requirements. - - In **Backup Time**, schedule a start time for the daily cluster backup. +3. In **Backup Time**, schedule a start time for the daily cluster backup. - If you do not specify a preferred backup time, TiDB Cloud assigns a default backup time, which is 2:00 AM in the time zone of the region where the cluster is located. +4. Click **Confirm**. - - In **Backup Retention**, configure the minimum backup data retention period. +## Restore - The backup retention period must be set within a range of 7 to 90 days. +TiDB Cloud Serverless clusters offer restore functionality to help recover data in case of accidental loss or corruption. -3. Click **Confirm**. +### Restore mode -### Delete backup files +TiDB Cloud Serverless supports snapshot restore and point-in-time restore for your cluster. -To delete an existing backup file, perform the following steps: +- **Snapshot Restore**: restores your cluster from a specific backup snapshot. -1. Navigate to the **Backup** tab of a cluster. +- **Point-in-Time Restore (beta)**: restores your cluster to a specific time. -2. Click **Delete** for the backup file that you want to delete. + - Free clusters: not supported. + - Scalable clusters: restores to any time within the last 14 days, but not before the cluster creation time or after the current time minus one minute. -## Restore +### Restore destination + +TiDB Cloud Serverless supports restoring in-place and restoring to a new cluster. + +**In-place restore** + +Restore to the current cluster will overwrite existing data. Note the following: + +- Existing connections will be terminated once the restore is started. +- The cluster will be unavailable, and new connections will be blocked during the restore process. +- Restore will affect tables in the `mysql` schema. Any changes to user credentials, permissions, or system variables will be reverted to their state at the backup time. + +**Restore to a new cluster** + +Create and restore to the new cluster. Note the following: + +- User credentials and permissions from the source cluster will not be restored to the new cluster. + +### Perform the restore -TiDB Cloud Serverless only supports in-place restoration. To restore your TiDB Cloud Serverless cluster from a backup, follow these steps: +To restore your TiDB Cloud Serverless cluster, follow these steps: 1. Navigate to the **Backup** page of a cluster. @@ -60,23 +91,17 @@ TiDB Cloud Serverless only supports in-place restoration. To restore your TiDB C 3. In **Restore Mode**, you can choose to restore from a specific backup or any point in time. -
+
To restore from a selected backup snapshot, take the following steps: - 1. Click **Basic Snapshot Restore**. - 2. Select the backup snapshot you want to restore to. + 1. Click **Snapshot Restore**. + 2. Select the backup snapshot you want to restore from.
- This feature lets you restore a cluster to a specific state from any time within the last 90 days. - - > **Note:** - > - > The **Point-in-Time Restore** feature is currently in beta. - - To restore from a specific point in time, take the following steps: + To restore to a specific point in time for a scalable cluster, take the following steps: 1. Click **Point-in-Time Restore**. 2. Select the date and time you want to restore to. @@ -84,6 +109,31 @@ TiDB Cloud Serverless only supports in-place restoration. To restore your TiDB C
-4. Click **Restore** to begin the restoration process. +4. In **Destination**, you can choose to restore to a new cluster or restore in-place. + + +
+ + To restore to a new cluster, take the following steps: + + 1. Click **Restore to a New Cluster**. + 2. Enter a name for the new cluster. + 3. Choose the cluster plan for the new cluster. + 4. If you choose a scalable cluster, set a monthly spending limit, and then configure advanced settings as needed. Otherwise, skip this step. + +
+
+ + To restore in-place, click **In-place Restore**. + +
+
+ +5. Click **Restore** to begin the restore process. + +Once the restore process begins, the cluster status changes to **Restoring**. The cluster will remain unavailable until the restore is complete and the status changes to **Available**. + +## Limitations - After initiating the restore process, the cluster status changes to **Restoring**. The cluster will be unavailable during the restore process and existing connections will be terminated. Once the restore process completes successfully, you can access the cluster as usual. +- If a TiFlash replica is enabled, it will be unavailable for a period after the restore, because data needs to be rebuilt in TiFlash. +- Manual backups are not supported for TiDB Cloud Serverless clusters. diff --git a/tidb-cloud/delete-tidb-cluster.md b/tidb-cloud/delete-tidb-cluster.md index 3ff4923c5fda1..930faf7a42f7e 100644 --- a/tidb-cloud/delete-tidb-cluster.md +++ b/tidb-cloud/delete-tidb-cluster.md @@ -26,7 +26,7 @@ You can delete a cluster at any time by performing the following steps: > **Note:** > - > [TiDB Cloud Serverless clusters](/tidb-cloud/select-cluster-tier.md#tidb-cloud-serverless) only support [in-place restoring from backups](/tidb-cloud/backup-and-restore-serverless.md#restore) and do not support restoring data after the deletion. If you want to delete a TiDB Cloud Serverless cluster and restore its data in the future, you can use [Dumpling](https://docs.pingcap.com/tidb/stable/dumpling-overview) to export your data as a backup. + > [TiDB Cloud Serverless clusters](/tidb-cloud/select-cluster-tier.md#tidb-cloud-serverless) do not support restoring data after the deletion. If you want to delete a TiDB Cloud Serverless cluster and restore its data in the future, see [Export Data from TiDB Cloud Serverless](/tidb-cloud/serverless-export.md) to export your data as a backup. 5. Click **I understand, delete it**. diff --git a/tidb-cloud/tidb-cloud-poc.md b/tidb-cloud/tidb-cloud-poc.md index 33e9a9bffbeae..3d2265be830a1 100644 --- a/tidb-cloud/tidb-cloud-poc.md +++ b/tidb-cloud/tidb-cloud-poc.md @@ -175,7 +175,7 @@ Now the workload testing is finished, you can explore more features, for example - Backup - To avoid vendor lock-in, you can use daily full backup to migrate data to a new cluster and use [Dumpling](https://docs.pingcap.com/tidb/stable/dumpling-overview) to export data. For more information, see [Back Up and Restore TiDB Cloud Dedicated Data](/tidb-cloud/backup-and-restore.md#turn-on-auto-backup) and [Back Up and Restore TiDB Cloud Dedicated Data](/tidb-cloud/backup-and-restore-serverless.md#backup). + To avoid vendor lock-in, you can use daily full backup to migrate data to a new cluster and use [Dumpling](https://docs.pingcap.com/tidb/stable/dumpling-overview) to export data. For more information, see [Back Up and Restore TiDB Cloud Dedicated Data](/tidb-cloud/backup-and-restore.md#turn-on-auto-backup) and [Back Up and Restore TiDB Cloud Serverless Data](/tidb-cloud/backup-and-restore-serverless.md). ## Step 8. Clean up the environment and finish the PoC