Deploy and Use BR
This document describes the recommended deployment of Backup & Restore (BR) and how to use BR to back up and restore data.
Deploy BR
Recommended practices when deploying BR:
In production environments, deploy BR on a node with at least 8 cores CPU and 16 GB memory. Select an appropriate OS version by following Linux OS version requirements.
Save backup data to Amazon S3, GCS or Azure Blob Storage.
Allocate sufficient resources for backup and restoration;
- BR, TiKV nodes, and the backup storage system should provide network bandwidth that is greater than the backup speed. If the target cluster is particularly large, the threshold of backup and restoration speed is limited by the bandwidth of the backup network.
- The backup storage system should also provide sufficient write/read performance (IOPS). Otherwise, the IOPS might become a performance bottleneck during backup or restoration.
- TiKV nodes need to have at least two additional CPU cores and high performance disks for backups. Otherwise, the backup might have an impact on the services running on the cluster.
Use BR
Currently, the following methods are supported to run the BR tool:
Use SQL statements
TiDB supports both BACKUP
and RESTORE
SQL statements. You can monitor the progress of these operations using the statement SHOW BACKUPS|RESTORES
.
Use the command-line tool
For details, see Use BR Command-line for Backup and Restoration.
Use BR in the Kubernetes environment
In a Kubernetes environment, you can use TiDB Operator to back up TiDB cluster data to Amazon S3, GCS or persistent volumes, and restore data from the backup data in such systems. For details, see Back Up and Restore Data Using TiDB Operator.