diff --git a/tidb-cloud/backup-and-restore.md b/tidb-cloud/backup-and-restore.md index 9875eafe09635..99b59d2ae5405 100644 --- a/tidb-cloud/backup-and-restore.md +++ b/tidb-cloud/backup-and-restore.md @@ -6,81 +6,153 @@ aliases: ['/tidbcloud/restore-deleted-tidb-cluster'] # Back Up and Restore TiDB Dedicated Data -This document describes how to back up and restore your TiDB Dedicated cluster data on TiDB Cloud. +This document describes how to back up and restore your TiDB Dedicated cluster data on TiDB Cloud. TiDB Dedicated supports automatic backup and manual backup. You can also restore backup data to a new cluster or restore a deleted cluster from the recycle bin. -> **Tip:** +> **Tip** > > To learn how to back up and restore TiDB Serverless cluster data, see [Back Up and Restore TiDB Serverless Data](/tidb-cloud/backup-and-restore-serverless.md). ## Limitations - TiDB Cloud does not support restoring tables in the `mysql` schema, including user permissions and system variables. -- If you turn on and off PITR (Point-in-time Recovery) multiple times, you can only choose a time point within the recoverable range after the most recent PITR is enabled. The earlier recoverable range is not accessible. +- If you turn on and off Point-in-time Restore multiple times, you can only choose a time point within the recoverable range after the most recent Point-in-time Restore is enabled. The earlier recoverable range is not accessible. +- DO NOT modify the switches of **Point-in-time Restore** and **Dual Region Backup** at the same time. ## Backup -TiDB Dedicated supports automatic backup and manual backup. +### Turn on auto backup -Automatic backups are scheduled for your TiDB Dedicated clusters according to the backup setting, which can reduce your loss in extreme disaster situations. You can also pick a backup snapshot and restore it into a new TiDB Dedicated cluster at any time. +TiDB Dedicated supports both [snapshot backup](https://docs.pingcap.com/tidb/stable/br-snapshot-guide) and [log backup](https://docs.pingcap.com/tidb/stable/br-pitr-guide). Snapshot backup enables you to restore data to the backup point. By default, snapshot backups are taken automatically and stored according to your backup retention policy. You can disable auto backup at any time. -### Automatic backup +#### Turn on Point-in-time Restore -By the automatic backup, you can back up the TiDB Dedicated cluster data every day at the backup time you have set. To set the backup time, perform the following steps: +> **Note** +> +> The Point-in-time Restore feature is supported for TiDB Dedicated clusters that are v6.4.0 or later. + +This feature supports restoring data of any point in time to a new cluster. You can use it to: + +- Reduce RPO in disaster recovery. +- Resolve cases of data write errors by restoring point-in-time that is before the error event. +- Audit the historical data of the business. + +It is strongly recommended to turn on this feature. The cost is the same as snapshot backup. For more information, refer to [Data Backup Cost](https://www.pingcap.com/tidb-dedicated-pricing-details#backup-storage-cost). + +To turn on this feature, perform the following steps: + +1. Navigate to the **Backup** page of a TiDB Dedicated cluster. + +2. Click **Backup Settings**. + +3. Toggle the **Auto Backup** switch to **On**. + +4. Toggle the **Point-in-time Restore** switch to **On**. + + > **Warning** + > + > Point-in-Time Restore only takes effect after the next backup task is completed. To make it take effect earlier, you can [manually perform a backup](#perform-a-manual-backup) after enabling it. + +5. Click **Confirm** to preview the configuration changes. + +6. Click **Confirm** again to save changes. + +#### Configure backup schedule + +TiDB Dedicated supports daily and weekly backup schedules. By default, the backup schedule is set to daily. You can choose a specific time of the day or week to start snapshot backup. + +To configure the backup schedule, perform the following steps: 1. Navigate to the **Backup** page of a TiDB Dedicated cluster. -2. Click **Backup Settings**. The setting window displays. +2. Click **Backup Settings**. -3. In the setting window, configure the automatic backup: +3. Toggle the **Auto Backup** switch to **On**. - - Toggle the **Auto Backup** switch to **On**. +4. Configure the backup schedule as follows: - - In **Backup Cycle**, select either the **Daily** or **Weekly** checkbox. If you select **Weekly**, you need to specify the days of the week for the backup. + - In **Backup Scheduler**, select either the **Daily** or **Weekly** checkbox. If you select **Weekly**, you need to specify the days of the week for the backup. + + > **Warning** + > + > - When weekly backup is enabled, the Point-in-time Restore feature is enabled by default and cannot be disabled. + > - If you change the backup scheduler from weekly to daily, the Point-in-time Restore feature remains its original setting. You can manually disable it if needed. - In **Backup Time**, schedule a start time for the daily or weekly cluster backup. - It is recommended to schedule automatic backup at a low workload period. 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. + 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. - - In **Backup Retention**, configure the minimum backup data retention period. + > **Note** + > + > - Backup jobs are automatically delayed when data import jobs are in progress. **DO NOT** run manual backups during data import or cluster scaling. - - Turn on or off the PITR (**Point-in-time Recovery**) feature. + - In **Backup Retention**, configure the minimum backup data retention period. The default period is 7 days. To minimize the impact on business, it is recommended to schedule automatic backup during periods of low workloads. - > **Note:** + > **Note** > - > - The PITR feature is enabled by default and cannot be disabled when you enable weekly backup. - > - If you change the backup cycle from weekly to daily, the PITR feature remains enabled. You can manually disable it if needed. + > - After you delete a cluster, the automatic backup files will be retained for a specified period, as set in backup retention. You need to delete the backup files accordingly. + > - After you delete a cluster, the existing manual backup files will be retained until you manually delete them, or your account is closed. + +### Turn on dual region backup (beta) + +> **Note:** +> +> The dual region backup feature is currently in beta. - PITR supports restoring data of any point in time to a new cluster. You can use it to: +TiDB Dedicated supports dual region backup by replicating backups from your cluster region to another different region. After you enable this feature, all backups are automatically replicated to the specified region. This provides cross-region data protection and disaster recovery capabilities. It is estimated that approximately 99% of the data can be replicated to the secondary region within an hour. - - Reduce RPO in disaster recovery. - - Resolve cases of data write errors by restoring point-in-time that is before the error event. - - Audit the historical data of the business. +Dual region backup costs include both backup storage usage and cross-region data transfer fees. For more information, refer to [Data Backup Cost](https://www.pingcap.com/tidb-dedicated-pricing-details#backup-storage-cost). - If you have one of the preceding needs and want to use the PITR feature, make sure that your TiDB Dedicated cluster version is at least v6.4.0. +To turn on dual region backup, perform the following steps: - - In **Backup Storage Region**, select the regions where you want to store your backup data. +1. Navigate to the **Backup** page of a TiDB Dedicated cluster. - TiDB Cloud stores your backup data in the current region of your cluster by default. This behavior cannot be changed. In addition, you can add another remote region, and TiDB Cloud will copy all new backup data to the remote region, which facilitates data safety and faster recovery. After adding a remote region as a backup data storage, you cannot remove the region. +2. Click **Backup Settings**. -4. Click **Confirm** to preview the configuration change. +3. Toggle the **Dual Region Backup** switch to **On**. - If you turn on PITR, you can select the **Perform a backup immediately and use it as recovery starting point in PITR.** checkbox. Otherwise, PITR will not be available until the next backup is completed. +4. From the **Dual Region** drop-down list, select a region to store the backup files. -5. Click **Confirm**. +5. Click **Confirm** to preview the configuration changes. -### Backup storage region support +6. Click **Confirm** again to save changes. -Currently, you cannot select an arbitrary remote region for backup data storage. The regions already supported are as follows: +### Turn off auto backup -| Cloud provider | Cluster region | Remote region support | -|----------------|-----------------------------|--------------------------| -| Google Cloud | Tokyo (asia-northeast1) | Osaka (asia-northeast2) | +> **Note** +> +> Turning off auto backup will also turn off point-in-time restore by default. -> **Note:** +To turn off auto backup, perform the following steps: + +1. Navigate to the **Backup** page of a TiDB Dedicated cluster. + +2. Click **Backup Settings**. + +3. Toggle the **Auto Backup** switch to **Off**. + +4. Click **Confirm** to preview the configuration changes. + +5. Click **Confirm** again to save changes. + +### Turn off dual region backup (beta) + +> **Tip** > -> If you select multiple backup storage regions, you will be charged for multiple backup storage and inter-region backup data replication out from the cluster region to each destination region. The cost is on a per-region basis and varies with the backup regions selected. For more information, see [Data Backup Cost](https://www.pingcap.com/tidb-cloud-pricing-details/#backup-storage-cost). +> Disabling dual region backup does not immediately delete the backups in the secondary region. These backups will be cleaned up later according to the backup retention schedule. To remove them immediately, you can manually [delete the backups](#delete-backups). + +To turn off dual region backup, perform the following steps: -### Manual backup +1. Navigate to the **Backup** page of a TiDB Dedicated cluster. + +2. Click **Backup Settings**. + +3. Toggle the **Dual Region Backup** switch to **Off**. + +4. Click **Confirm** to preview the configuration changes. + +5. Click **Confirm** again to save changes. + +### Perform a manual backup Manual backups are user-initiated backups that enable you to back up your data to a known state as needed, and then restore to that state at any time. @@ -94,7 +166,9 @@ To apply a manual backup to your TiDB Dedicated cluster, perform the following s 4. Click **Confirm**. Then your cluster data is backed up. -### Delete backup files +### Delete backups + +#### Delete backup files To delete an existing backup file, perform the following steps: @@ -102,7 +176,7 @@ To delete an existing backup file, perform the following steps: 2. Click **Delete** for the backup file that you want to delete. -### Delete a running backup job +#### Delete a running backup job To delete a running backup job, it is similar as [**Delete backup files**](#delete-backup-files). @@ -110,19 +184,8 @@ To delete a running backup job, it is similar as [**Delete backup files**](#dele 2. Click **Delete** for the backup file that is in the **Pending** or **Running** state. -### Best practices for backup - -- It is recommended that you perform backup operations at cluster idle time to minimize the impact on business. -- Do not run the manual backup while importing data, or during cluster scaling. -- After you delete a cluster, the existing manual backup files will be retained until you manually delete them, or your account is closed. Automatic backup files will be retained for a specified period (you can configure the retention period in **Backup Settings**) from the date of cluster deletion. You need to delete the backup files accordingly. - ## Restore -TiDB Dedicated provides two types of data restoration: - -- Restore backup data to a new cluster -- Restore a deleted cluster from the recycle bin - ### Restore data to a new cluster To restore your TiDB Dedicated cluster data from a backup to a new cluster, take the following steps: @@ -131,15 +194,21 @@ To restore your TiDB Dedicated cluster data from a backup to a new cluster, take 2. Click **Restore**. The setting window displays. -3. In **Restore Mode**, you can choose to restore data of any point in time or a selected backup to a new cluster. +3. In **Restore Mode**, choose **Restore From Region**, indicating the region of backup stores. + + > **Note** + > + > - The default value of the **Restore From Region** is the same as the backup cluster. + +4. In **Restore Mode**, choose to restore data of any point in time or a selected backup to a new cluster.
- To restore data of any point in time within the backup retention to a new cluster, make sure that **PITR** in **Backup Settings** is on and then take the following steps: + To restore data of any point in time within the backup retention to a new cluster, make sure that **Point-in-time Restore** in **Backup Settings** is on and then take the following steps: - 1. Click **Select Time Point**. - 2. Select **Date** and **Time** you want to restore to. + - Click **Select Time Point**. + - Select **Date** and **Time** you want to restore to.
@@ -147,28 +216,32 @@ To restore your TiDB Dedicated cluster data from a backup to a new cluster, take To restore a selected backup to the new cluster, take the following steps: - 1. Click **Select Backup Name**. - 2. Select a backup you want to restore to. + - Click **Select Backup Name**. + - Select a backup you want to restore to.
-4. In **Restore to Region**, select the same region as the **Backup Storage Region** configured in the **Backup Settings**. +5. In **Restore to Region**, select the same region as the **Backup Storage Region** configured in the **Backup Settings**. -5. In the **Restore** window, you can also make the following changes if necessary: +6. In the **Restore** window, you can also make the following changes if necessary: - Set the cluster name. - Update the port number of the cluster. - Increase node number, vCPU and RAM, and storage for the cluster. -6. Click **Restore**. +7. Click **Restore**. The cluster restore process starts and the **Security Settings** dialog box is displayed. -7. In the **Security Settings** dialog box, set the root password and allowed IP addresses to connect to your cluster, and then click **Apply**. +8. In the **Security Settings** dialog box, set the root password and allowed IP addresses to connect to your cluster, and then click **Apply**. ### Restore a deleted cluster +> **Note:** +> +> You cannot restore a deleted cluster to any point in time. You can only select an automatic or manual backup to restore. + To restore a deleted cluster from recycle bin, take the following steps: 1. Log in to the [TiDB Cloud console](https://tidbcloud.com). @@ -184,8 +257,4 @@ To restore a deleted cluster from recycle bin, take the following steps: The cluster restore process starts and the **Security Settings** dialog box is displayed. -7. In the **Security Settings** dialog box, set the root password and allowed IP addresses to connect to your cluster, and then click **Apply**. - -> **Note:** -> -> You cannot restore a deleted cluster to any point in time. You can only select an automatic or manual backup to restore. +7. In the **Security Settings** dialog box, set the root password and allowed IP addresses to connect to your cluster, and then click **Apply**. \ No newline at end of file diff --git a/tidb-cloud/pause-or-resume-tidb-cluster.md b/tidb-cloud/pause-or-resume-tidb-cluster.md index 7ccd03253cf24..225df9d1ffcd9 100644 --- a/tidb-cloud/pause-or-resume-tidb-cluster.md +++ b/tidb-cloud/pause-or-resume-tidb-cluster.md @@ -34,7 +34,7 @@ When a cluster is paused, note the following: - Node Storage Cost - Data Backup Cost -- TiDB Cloud stops [automatic backup](/tidb-cloud/backup-and-restore.md#automatic-backup) of the cluster. +- TiDB Cloud stops [automatic backup](/tidb-cloud/backup-and-restore.md#turn-on-auto-backup) of the cluster. To pause a cluster, take the following steps: @@ -61,7 +61,7 @@ After a paused cluster is resumed, note the following: - TiDB Cloud resumes collecting the monitoring information of the cluster, and you can read data from or write data to the cluster. - TiDB Cloud resumes charging both compute and storage costs. -- TiDB Cloud resumes [automatic backup](/tidb-cloud/backup-and-restore.md#automatic-backup) of the cluster. +- TiDB Cloud resumes [automatic backup](/tidb-cloud/backup-and-restore.md#turn-on-auto-backup) of the cluster. To resume a paused cluster, take the following steps: diff --git a/tidb-cloud/tidb-cloud-faq.md b/tidb-cloud/tidb-cloud-faq.md index 2a60a3df0d3c7..fe3ce2e2f71b1 100644 --- a/tidb-cloud/tidb-cloud-faq.md +++ b/tidb-cloud/tidb-cloud-faq.md @@ -104,7 +104,7 @@ TiDB is highly compatible with MySQL. You can migrate data from any MySQL-compat ### Does TiDB Cloud support incremental backups? -No. If you need to restore data to any point in time within the cluster's backup retention, you can use PITR (Point-in-time Recovery). For more information, see [Use PITR in a TiDB Dedicated cluster](/tidb-cloud/backup-and-restore.md#automatic-backup) or [Use PITR in a TiDB Serverless cluster](/tidb-cloud/backup-and-restore-serverless.md#restore). +No. If you need to restore data to any point in time within the cluster's backup retention, you can use PITR (Point-in-time Recovery). For more information, see [Use PITR in a TiDB Dedicated cluster](/tidb-cloud/backup-and-restore.md#turn-on-auto-backup) or [Use PITR in a TiDB Serverless cluster](/tidb-cloud/backup-and-restore-serverless.md#restore). ## HTAP FAQs diff --git a/tidb-cloud/tidb-cloud-poc.md b/tidb-cloud/tidb-cloud-poc.md index 841781e0ebc83..ca02723d8d086 100644 --- a/tidb-cloud/tidb-cloud-poc.md +++ b/tidb-cloud/tidb-cloud-poc.md @@ -81,7 +81,7 @@ Once a dedicated PoC cluster is created, you are ready to load data and perform For a newly created cluster, note the following configurations: - The default time zone (the **Create Time** column on the Dashboard) is UTC. You can change it to your local time zone by following [Set the Local Time Zone](/tidb-cloud/manage-user-access.md#set-the-time-zone-for-your-organization). -- The default backup setting on a new cluster is full database backup on a daily basis. You can specify a preferred backup time or back up data manually. For the default backup time and more details, see [Back up and Restore TiDB Cluster Data](/tidb-cloud/backup-and-restore.md#backup). +- The default backup setting on a new cluster is full database backup on a daily basis. You can specify a preferred backup time or back up data manually. For the default backup time and more details, see [Back up and Restore TiDB Cluster Data](/tidb-cloud/backup-and-restore.md#turn-on-auto-backup). ## Step 4. Adapt your schemas and SQL @@ -130,7 +130,7 @@ You can import data in various formats to TiDB Cloud: Now you have created the environment, adapted the schemas, and imported data. It is time to test your workload. -Before testing the workload, consider performing a manual backup, so that you can restore the database to its original state if needed. For more information, see [Back up and Restore TiDB Cluster Data](/tidb-cloud/backup-and-restore.md#backup). +Before testing the workload, consider performing a manual backup, so that you can restore the database to its original state if needed. For more information, see [Back up and Restore TiDB Cluster Data](/tidb-cloud/backup-and-restore.md#turn-on-auto-backup). After kicking off the workload, you can observe the system using the following methods: @@ -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 Dedicated Data](/tidb-cloud/backup-and-restore.md#backup) and [Back Up and Restore TiDB 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 Dedicated Data](/tidb-cloud/backup-and-restore.md#turn-on-auto-backup) and [Back Up and Restore TiDB Dedicated Data](/tidb-cloud/backup-and-restore-serverless.md#backup). ## Step 8. Clean up the environment and finish the PoC diff --git a/tidb-cloud/tidb-cloud-release-notes.md b/tidb-cloud/tidb-cloud-release-notes.md index 851eacb526e72..cea5b08b07cfd 100644 --- a/tidb-cloud/tidb-cloud-release-notes.md +++ b/tidb-cloud/tidb-cloud-release-notes.md @@ -250,7 +250,7 @@ This page lists the release notes of [TiDB Cloud](https://www.pingcap.com/tidb-c If you use GitHub for application development, you can integrate TiDB Serverless branching into your GitHub CI/CD pipeline, which lets you automatically test your pull requests with branches without affecting the production database. For more information, see [Integrate TiDB Serverless Branching (Beta) with GitHub](/tidb-cloud/branch-github-integration.md). -- Support weekly backup for [TiDB Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-dedicated) clusters. For more information, see [Back up and restore TiDB Dedicated data](/tidb-cloud/backup-and-restore.md#automatic-backup). +- Support weekly backup for [TiDB Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-dedicated) clusters. For more information, see [Back up and restore TiDB Dedicated data](/tidb-cloud/backup-and-restore.md#turn-on-auto-backup). ## July 4, 2023