- Introduction
- Quick Start
- Perform a PoC
- Use Your Cluster
- Create a TiDB Cluster
- Connect to Your TiDB Cluster
- Set Up VPC Peering Connections
- Monitor a TiDB Cluster
- Overview
- Built-in Alerting
- Third-Party Monitoring Integrations
- Scale a TiDB Cluster
- Use an HTAP Cluster
- Back Up and Restore Data
- Tune Performance
- Upgrade a TiDB Cluster
- Delete a TiDB Cluster
- Migrate Data
- Import Sample Data
- Migrate Data into TiDB
- Export Data from TiDB
- Manage User Access
- Billing
- Reference
- Support
- FAQs
- Glossary
- Release Notes
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:
Navigate to the Backup tab of a cluster.
Click Auto Setting. The setting window displays.
In the setting window, select Backup Time and maximum backup files in Limit (backup files).
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 provider | Region name | Region | Default backup time |
---|---|---|---|
AWS | US East (N. Virginia) | us-east-1 | 07:00 UTC |
AWS | US West (Oregon) | us-west-2 | 10:00 UTC |
AWS | Asia Pacific (Tokyo) | ap-northeast-1 | 17:00 UTC |
AWS | Asia Pacific (Seoul) | ap-northeast-2 | 17:00 UTC |
AWS | Asia Pacific (Singapore) | ap-southeast-1 | 18:00 UTC |
AWS | Asia Pacific (Mumbai) | ap-south-1 | 20:30 UTC |
AWS | Europe (Frankfurt) | eu-central-1 | 03:00 UTC |
GCP | Iowa | us-central1 | 08:00 UTC |
GCP | Oregon | us-west1 | 10:00 UTC |
GCP | Tokyo | asia-northeast1 | 17:00 UTC |
GCP | Singapore | asia-southeast1 | 18: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:
Navigate to the Backup tab of a cluster.
Click Manual on the upper right.
Enter a Name.
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:
Navigate to the Backup tab of a cluster.
Select an existing backup in the list, and click Restore.
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.
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:
In the TiDB Cloud console, go to the target project and click the Recycle Bin tab.
Locate the cluster you want to restore, and then click Backups in the Action column.
Locate your desired backup time, and then click Restore.
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.
Click Confirm.