TiDBTiDB Docs Dash 2024

Jan 9 - Jan 12 (UTC)
Join us to improve docs and win a prize!
Sign InTry Free

Back Up and Restore TiDB Dedicated Data

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.

Limitations

  • 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 NOT modify the switches of Point-in-time Restore and Dual Region Backup at the same time.

Backup

Turn on auto backup

TiDB Dedicated supports both snapshot backup and log backup. 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

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.

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.

  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.

  3. Toggle the Auto Backup switch to On.

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

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

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

Turn on dual region backup (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.

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. Toggle the Dual Region Backup switch to On.

  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

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)

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

To apply a manual backup to your TiDB Dedicated cluster, perform the following steps:

  1. Navigate to the Backup tab of a cluster.

  2. Click Manual Backup. The setting window displays.

  3. Enter a Name.

  4. Click Confirm. Then your cluster data is backed up.

Delete backups

Delete backup files

To delete an existing backup file, perform the following steps:

  1. Navigate to the Backup tab of a cluster.

  2. Click Delete for the backup file that you want to delete.

Delete a running backup job

To delete a running backup job, it is similar as Delete backup files.

  1. Navigate to the Backup tab of a cluster.

  2. Click Delete for the backup file that is in the Pending or Running state.

Restore

Restore data to a new cluster

To restore your TiDB Dedicated cluster data from a backup to a new cluster, take the following steps:

  1. Navigate to the Backup tab of a cluster.

  2. Click Restore. The setting window displays.

  3. In Restore Mode, choose Restore From Region, indicating the region of backup stores.

  4. In Restore Mode, choose to restore data of any point in time or a selected backup to a new cluster.

    • Select Time Point
    • Select Backup Name

    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:

    • Click Select Time Point.
    • Select Date and Time you want to restore to.

    To restore a selected backup to the new cluster, take the following steps:

    • Click Select Backup Name.
    • Select a backup you want to restore to.
  5. In Restore to Region, select the same region as the Backup Storage Region configured in the Backup Settings.

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

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

  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

To restore a deleted cluster from recycle bin, take the following steps:

  1. Log in to the TiDB Cloud console.

  2. Click in the lower-left corner, switch to the target project if you have multiple projects, and then click Project Settings.

  3. On the Project Settings page of your project, click Recycle Bin in the left navigation pane, locate the cluster you want to restore, and then click Backups in the Action column.

  4. Locate your desired backup time, and then click Restore in the Action column.

  5. In the Restore window, make the following changes if necessary:

    • Update the port number of the cluster.
    • Increase the node number, vCPU and RAM, and storage for the cluster.
  6. Click Confirm.

    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.

Was this page helpful?

Download PDFRequest docs changesAsk questions on Discord
Playground
New
One-stop & interactive experience of TiDB's capabilities WITHOUT registration.
Products
TiDB
TiDB Dedicated
TiDB Serverless
Pricing
Get Demo
Get Started
© 2024 PingCAP. All Rights Reserved.
Privacy Policy.