title | summary | aliases | |
---|---|---|---|
Back up and Restore TiDB Cluster Data |
Learn how to back up and restore your TiDB Cloud cluster. |
|
This document describes how to back up and restore your TiDB cluster data on TiDB Cloud.
Note:
For Serverless Tier clusters, the backup and restore feature is unavailable. You can use Dumpling to export your data as a backup.
TiDB Cloud provides two types of data backup: automatic backup and manual backup.
Daily backups are automatically scheduled for your TiDB clusters in TiDB Cloud. You can pick a backup snapshot and restore it into a new TiDB cluster at any time. Automated backup can reduce your losses in extreme disaster situations.
By the automatic backup, you can 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, which is 2:00 AM in the time zone of the region where the cluster is located.
Note that you cannot disable automatic 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.
To delete an existing backup file, perform the following steps:
-
Navigate to the Backup tab of a cluster.
-
Click Delete for the backup file that you want to delete.
To delete a running backup job, it is similar as Delete backup files.
-
Navigate to the Backup tab of a cluster.
-
Click Delete for the backup file that is in the Pending or Running state.
- 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 7 days from the date of cluster deletion. You need to delete the backup files accordingly.
TiDB Cloud provides two types of data restoration:
- Restore backup data to a new cluster
- Restore a deleted cluster from the recycle bin
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, make the following changes if necessary:
- Update the port number of the cluster.
- Increase the node size, node quantity, and node storage for the cluster.
-
Click Confirm.
The cluster restore process starts and the Security Settings dialog box is displayed.
-
In the Security Settings dialog box, set the root password and allowed IP addresses to connect to your cluster, and then click Apply.
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, make the following changes if necessary:
- Update the port number of the cluster.
- Increase the node size, node quantity, and node storage for the cluster.
-
Click Confirm.
The cluster restore process starts and the Security Settings dialog box is displayed.
-
In the Security Settings dialog box, set the root password and allowed IP addresses to connect to your cluster, and then click Apply.