View a markdown version of this page

Fast Backup and Restore of TiDB on AWS - Fast Backup and Restore of TiDB on AWS

Fast Backup and Restore of TiDB on AWS

Publication date: February 16, 2023 (Diagram history)

TiDB is an open-source MySQL-compatible database that supports hybrid transactional and analytical processing (HTAP). TiDB clusters deployed on AWS use Amazon EBS snapshots for fast backup and restore of several terabytes of data in one hour without impacting cluster performance.

Fast Backup and Restore of TiDB on AWS

Architecture diagram showing fast backup and restore of TiDB on AWS using Amazon EBS snapshots and Amazon S3.

The following steps describe the architecture:

  1. When the user submits a backup request, TiDB Operator checks and collects information from volumes mounted to TiKV and creates a backup job. The backup job pauses the scheduler and garbage collection.

  2. The backup job asks AWS to create an Amazon EBS snapshot and resumes the schedulers and garbage collection. After the snapshot completes, the backup job saves the metadata to Amazon S3.

  3. When the user submits a restore request, the backup job creates a restore job that retrieves backup metadata from Amazon S3 and extracts snapshot information. It invokes the AWS API to create volumes from the Amazon EBS snapshot and returns the created volume information to TiDB Operator.

  4. TiDB Operator configures Amazon EKS and mounts the restored volumes to corresponding nodes. After the data restore completes, the TiDB cluster exits restore mode and starts all TiDB nodes to serve requests.

Further reading

For additional information, refer to the following resources:

Diagram history

To be notified about updates to this reference architecture diagram, subscribe to the RSS feed.

ChangeDescriptionDate

Initial publication

Reference architecture diagram first published.

February 16, 2023

Note

To subscribe to RSS updates, you must have an RSS plugin enabled for the browser you are using.