Back up and Restore TiDB Cluster Data

This document describes how to back up and restore your TiDB cluster data on TiDB Cloud.

Backup

TiDB Cloud provides two types of data backup: automatic backup and manual backup.

For Developer Tier clusters, each cluster allows one automatic backup and two manual backups:

  • For automatic backup, if there is an existing backup, it will be replaced by the newer backup.
  • For manual backup, if you already have two backups, you need to delete at least one backup before you are able to make another backup.

Automatic backup

Automatic backups back up the cluster data every day at the backup time you have set. To set the backup time, perform the following steps:

  1. Navigate to the Backup tab of a cluster.

  2. Click Auto Setting. The setting window displays.

  3. In the setting window, select Backup Time and maximum backup files in Limit (backup files).

  4. Click Confirm.

If you do not specify a preferred backup time, TiDB Cloud assigns a default backup time based on each region. The following table lists the default backup time for each region:

Cloud providerRegion nameRegionDefault backup time
AWSUS East (N. Virginia)us-east-107:00 UTC
AWSUS West (Oregon)us-west-210:00 UTC
AWSAsia Pacific (Tokyo)ap-northeast-117:00 UTC
AWSAsia Pacific (Seoul)ap-northeast-217:00 UTC
AWSAsia Pacific (Singapore)ap-southeast-118:00 UTC
AWSAsia Pacific (Mumbai)ap-south-120:30 UTC
AWSEurope (Frankfurt)eu-central-103:00 UTC
GCPIowaus-central108:00 UTC
GCPOregonus-west110:00 UTC
GCPTokyoasia-northeast117:00 UTC
GCPSingaporeasia-southeast118:00 UTC

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 cluster, perform the following steps:

  1. Navigate to the Backup tab of a cluster.

  2. Click Manual on the upper right.

  3. Enter a Name.

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

Restore

TiDB Cloud 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 cluster data from a backup to a new cluster, take the following steps:

  1. Navigate to the Backup tab of a cluster.

  2. Select an existing backup in the list, and click Restore.

  3. In the Restore window, enter the cluster name and password.

    If needed, you can also increase the vCPUs size, node quantity, and storage size for the cluster.

  4. Click Confirm.

Restore a deleted cluster

When you delete a TiDB cluster, TiDB Cloud automatically creates a backup of the deleted cluster in the recycle bin and retains the backup for 7 days.

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

  1. In the TiDB Cloud console, go to the target project and click the Recycle Bin tab.

  2. Locate the cluster you want to restore, and then click Backups in the Action column.

  3. Locate your desired backup time, and then click Restore.

  4. In the Restore window, enter the cluster name and root password.

    If needed, you can also increase the vCPUs size, node quantity, and storage size for the cluster.

  5. Click Confirm.

Was this page helpful?