Sign In Try 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.

Limitations

  • TiDB Cloud does not support restoring tables in themysqlschema, including user permissions and system variables.
  • If you turn on and off PITR (Point-in-time Recovery) multiple times, you can only choose a time point within the recoverable range after the most recent PITR is enabled. The earlier recoverable range is not accessible.

Backup

TiDB Dedicated supports automatic backup and manual backup.

Automatic backups are scheduled for your TiDB Dedicated clusters according to the backup setting, which can reduce your loss in extreme disaster situations. You can also pick a backup snapshot and restore it into a new TiDB Dedicated cluster at any time.

Automatic backup

By the automatic backup, you can back up the TiDB Dedicated cluster data every day at the backup time you have set. To set the backup time, perform the following steps:

  1. Navigate to theBackuppage of a TiDB Dedicated cluster.

  2. ClickBackup Settings. The setting window displays.

  3. In the setting window, configure the automatic backup:

    • Toggle theAuto Backupswitch toOn.

    • InBackup Cycle, select either theDailyorWeeklycheckbox. If you selectWeekly, you need to specify the days of the week for the backup.

    • InBackup Time, schedule a start time for the daily or weekly cluster backup.

      It is recommended to schedule automatic backup at a low workload period. 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.

    • InBackup Retention, configure the minimum backup data retention period.

    • Turn on or off the PITR (Point-in-time Recovery) feature.

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

        If you have one of the preceding needs and want to use the PITR feature, make sure that your TiDB Dedicated cluster version is at least v6.4.0.

    • InBackup Storage Region, select the regions where you want to store your backup data.

      TiDB Cloud stores your backup data in the current region of your cluster by default. This behavior cannot be changed. In addition, you can add another remote region, and TiDB Cloud will copy all new backup data to the remote region, which facilitates data safety and faster recovery. After adding a remote region as a backup data storage, you cannot remove the region.

  4. ClickConfirmto preview the configuration change.

    If you turn on PITR, you can select thePerform a backup immediately and use it as recovery starting point in PITR.checkbox. Otherwise, PITR will not be available until the next backup is completed.

  5. ClickConfirm.

Backup storage region support

Currently, you cannot select an arbitrary remote region for backup data storage. The regions already supported are as follows:

Cloud provider Cluster region Remote region support
Google Cloud Tokyo (asia-northeast1) Osaka (asia-northeast2)

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 theBackuptab of a cluster.

  2. ClickManual Backup. The setting window displays.

  3. Enter aName.

  4. ClickConfirm. Then your cluster data is backed up.

删除backup files

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

  1. Navigate to theBackuptab of a cluster.

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

删除a running backup job

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

  1. Navigate to theBackuptab of a cluster.

  2. Click删除for the backup file that is in thePendingorRunningstate.

Best practices for backup

  • 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 a specified period (you can configure the retention period inBackup Settings) from the date of cluster deletion. You need to delete the backup files accordingly.

Restore

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

  1. Navigate to theBackuptab of a cluster.

  2. ClickRestore. The setting window displays.

  3. InRestore Mode, you can 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 thatPITRinBackup Settingsis on and then take the following steps:

    1. ClickSelect Time Point.
    2. SelectDateandTimeyou want to restore to.

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

    1. ClickSelect Backup Name.
    2. Select a backup you want to restore to.
  4. InRestore to Region, select the same region as theBackup Storage Regionconfigured in theBackup Settings.

  5. In theRestorewindow, 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.
  6. ClickRestore.

    The cluster restore process starts and theSecurity Settingsdialog box is displayed.

  7. In theSecurity Settingsdialog box, set the root password and allowed IP addresses to connect to your cluster, and then clickApply.

Restore a deleted cluster

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

  1. Log in to theTiDB Cloud console.

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

  3. On theProject Settingspage of your project, clickRecycle Binin the left navigation pane, locate the cluster you want to restore, and then clickBackupsin theActioncolumn.

  4. Locate your desired backup time, and then clickRestorein theActioncolumn.

  5. In theRestorewindow, 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. ClickConfirm.

    The cluster restore process starts and theSecurity Settingsdialog box is displayed.

  7. In theSecurity Settingsdialog box, set the root password and allowed IP addresses to connect to your cluster, and then clickApply.

Download PDF Request docs changes Ask questions on Discord
Playground
New
一站式& TiDB capabi的互动体验lities WITHOUT registration.
Was this page helpful?
Products
TiDB
TiDB Dedicated
TiDB Serverless
Pricing
Get Demo
Get Started
©2023PingCAP. All Rights Reserved.