Skip to content

Commit

Permalink
fix format
Browse files Browse the repository at this point in the history
Signed-off-by: Aolin <[email protected]>
  • Loading branch information
Oreoxmt committed Oct 10, 2023
1 parent 71ab997 commit 96f728c
Showing 1 changed file with 65 additions and 54 deletions.
119 changes: 65 additions & 54 deletions tidb-cloud/backup-and-restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,129 +16,140 @@ This document describes how to back up and restore your TiDB Dedicated cluster d

- TiDB Cloud does not support restoring tables in the `mysql` schema, including user permissions and system variables.
- 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 modify the switch of **Point-in-time Restore** and **Dual Region Backup** at the same time.

## Backup

### Turn on auto backup

TiDB Dedicated supports both [snapshot backups](https://docs.pingcap.com/tidb/stable/br-snapshot-guide) and [log backups](https://docs.pingcap.com/tidb/stable/br-pitr-guide). Snapshot backup enables users to restore to the 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.
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.

#### Turn on point-in-time restore / log backup
#### Turn on Point-in-time Restore

> **Note**
>
> Point-in-time Restore / Log Backup is supported from **TiDB v6.4.0**.
> The Point-in-time Restore feature is supported for TiDB Dedicated clusters that are v6.4.0 or later.
This option enables users to restore to any point in time whithin the backup retention window to a new cluster. It could be used to reduce RPO in disaster recovery, undo mistaken DML, and audit historical business data. It's strongly recommended to turn on this feature. It's charged as same as snpashot backup. For more information, refer to: [Data Backup Cost](https://www.pingcap.com/tidb-dedicated-pricing-details/#backup-storage-cost).
This feature supports restoring data of any point in time to a new cluster. You can use it to:

To turn on this feature:
- 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. Turn the **Auto Backup** switch to **ON**.
3. Toggle the **Auto Backup** switch to **On**.

4. Turn the **Point-in-time Restore** switch to **ON**.
4. Toggle the **Point-in-time Restore** switch to **On**.

> **Warning**
>
> - When weekly backup is enabled, point-in-time restore will be enabled by default and cannot be modified.
> - If the backup schedule is changed from weekly to daily, point-in-time restore remains its original settings. You can manually disable it if needed.
> - Once point-in-time restore configuration is enabled, **it will only become effective after the completion of the next backup task**. If you want point-in-time restore take effect immediately, you need to manually initiate a backup after configuring it.
> - Don't modify the switch of **Point-in-time Restore** and **Dual Region Backup** at the same time.
> 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-manual-backups) after enabling it.
1. Click **Confirm** to preview the configuration changes.
5. Click **Confirm** to preview the configuration changes.

2. Click **Confirm** again to save changes.
6. Click **Confirm** again to save changes.

#### Configure backup schedule

> **Warning**
>
> - When weekly backup is enabled, point-in-time restore will be enabled by default and cannot be modified.
> - If the backup schedule is changed from weekly to daily, point-in-time restore remains its original settings. You can manually disable it if needed.
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.

TiDB Dedicated supports two backup schedules: Daily and Weekly. 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 backup schedule:
To configure the backup schedule, toggle the **Auto Backup** switch to **On** and make the following settings:

1. Navigate to the **Backup** page of a TiDB Dedicated cluster.

2. Click **Backup Settings**.

3. Under **Backup Schedule**, choose either the **Daily** or **Weekly** option. If you choose **Weekly**, specify the days of the week for the backup.
3. Toggle the **Auto Backup** switch to **On**.

4. In **Backup Time**, set a start time for the daily or weekly cluster backup. By default, it's a daily backup starting from 2:00 AM in the time zone of the cluster's region.
4. Toggle the **Point-in-time Restore** switch to **On**.

> **Note**
>
> - Scheduling automatic backup jobs during periods of low workload is recommended to minimize the impact on business operations.
> - Backup jobs will be automatically delayed when importing data jobs are in progress. Do not run the manual backup during data import jobs or cluster scaling.
5. Configure the backup schedule as follows:

- 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.

5. In **Backup Retention**, configure the minimum backup data retention period. The default is 7 days.
> **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.
> **Note**
>
> - After you delete the cluster, the automatic backup files will be kept for a specific duration, as set in Backup Settings. Remember to delete these backup files as needed.
> - After you delete a cluster, the existing manual backup files will be retained until you manually delete them, or your account is closed.
- In **Backup Time**, schedule a start time for the daily or weekly 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.

6. Click **Confirm** to preview the configuration change.
> **Note**
>
> - To minimize the impact on business, it is recommended to schedule automatic backup during periods of low workloads.
> - Backup jobs are automatically delayed when data import jobs are in progress. **DO NOT** run manual backups during data import, or during cluster scaling.
7. Click **Confirm** again to save changes.
- In **Backup Retention**, configure the minimum backup data retention period. The default is seven days.

### Turn on dual region backup(Beta)
> **Note**
>
> - After you delete the cluster, the automatic backup files will be retained for a specified period, as set in **Backup Settings**. 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.
TiDB Dedicated supports dual region backup by copying backups to the new region as selected. After enabling it, all backups will be automatically copied to the specified region, providing an cross region data protection and disaster recovery capabilities. Approximately 99% of the data could be copied to the additional region within 1 hour.
### Turn on dual region backup (beta)

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).
> **Note:**
>
> The dual region backup feature is currently in beta.
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.

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).

To turn on dual region backup:
To turn on dual region backup, perform the following steps:

1. Navigate to the **Backup** page of a TiDB Dedicated cluster.

2. Click **Backup Settings**.

3. Turn the **Dual Region Backup** switch to **ON**.
3. Toggle the **Dual Region Backup** switch to **On**.

4. Choose the additional region from the drop box where stores backup data.
4. From the **Dual Region** drop-down list, select a region to store the backup files.

5. Click **Confirm** to preview the configuration changes.

6. Click **Confirm** again to save changes.

### Turn off auto backup

> **Note**
>
> - Turning off auto backup will also turn off point-in-time restore by default.
> **Note**
>
> Turning off auto backup will also turn off point-in-time restore by default.
To turn off auto backup:

1. Navigate to the **Backup** page of a TiDB Dedicated cluster.

2. Click **Backup Settings**.

3. Turn the **Auto Backup** switch to **OFF**.
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)
### Turn off dual region backup (beta)

> **Tip**
>
> - Disabling dual region backup does not immediately delete the backups in the additional region. They will be cleaned up later according to the backup retention schedule. However, if you want to remove them immediately, you can choose to manually delete the backups.
> **Tip**
>
> 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:
To turn off dual region backup, perform the following steps:

1. Navigate to the **Backup** page of a TiDB Dedicated cluster.

2. Click **Backup Settings**.

3. Turn the **Dual Region Backup** switch to **OFF**.
3. Toggle the **Dual Region Backup** switch to **Off**.

4. Click **Confirm** to preview the configuration changes.

Expand Down Expand Up @@ -192,7 +203,7 @@ To restore your TiDB Dedicated cluster data from a backup to a new cluster, take
>
> - The default value of the **Restore From Region** is the same as the backup cluster.
1. In **Restore Mode**, choose to restore data of any point in time or a selected backup to a new cluster.
4. In **Restore Mode**, choose to restore data of any point in time or a selected backup to a new cluster.

<SimpleTab>
<div label="Select Time Point">
Expand All @@ -214,19 +225,19 @@ To restore your TiDB Dedicated cluster data from a backup to a new cluster, take
</div>
</SimpleTab>

2. 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**.

3. 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.

4. Click **Restore**.
7. Click **Restore**.

The cluster restore process starts and the **Security Settings** dialog box is displayed.

5. 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

Expand Down

0 comments on commit 96f728c

Please sign in to comment.