What methods do you use to back up your TiDB, and how do you back up incremental data?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: 大家的TIDB都采用什么方式备份,如何备份数据的增量

| username: lemonade010

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version]
[Reproduction Path] What operations were performed that caused the issue
[Encountered Issues: Problem Phenomenon and Impact] How does everyone back up their TiDB? How do you back up incremental data?

| username: tidb菜鸟一只 | Original post link

Bro, combining snapshots and logs, incremental backups are just log backups.

| username: Miracle | Original post link

Dumpling

| username: zhanggame1 | Original post link

TiDB comes with Dumpling for logical backups and BR for physical backups. When using BR for backups, enabling log backups allows for incremental backups. However, there is a time difference of 1 to 3 minutes between the incremental backups and the database, so it cannot guarantee that all data will be recovered if the database crashes.

| username: 路在何chu | Original post link

BR is used more often and backups are faster. If you need to back up a specific database, use Dumpling.

| username: Jayjlchen | Original post link

TiDB Log Backup and PITR Usage Guide | PingCAP Documentation Center

| username: Kongdom | Original post link

Perform a full backup using BR.

| username: TiDBer_vfJBUcxl | Original post link

Use BR for backup.

| username: cassblanca | Original post link

BR works well.

| username: zhaokede | Original post link

The managed data has not been officially activated yet, mainly consisting of some configuration data. The data volume is not very large, and BR is used for backup.

| username: TiDBer_08RNElU3 | Original post link

Use BR

| username: wfxxh | Original post link

Cold backup uses BR, hot backup uses TiCDC.

| username: WinterLiu | Original post link

Personally, I think using TiCDC to synchronize to a downstream TiDB cluster is the most perfect backup solution.

| username: 春风十里 | Original post link

Physical backup br + log backup
If the data volume is not particularly large, or for some important tables, daily logical backup with dumpling can also be considered.

| username: kkpeter | Original post link

BR backup to S3

| username: xingzhenxiang | Original post link

No backups, it’s been running for three years.

| username: 哈喽沃德 | Original post link

  1. Full Backup: Full backup is the most common and simplest backup method, achieved by completely backing up the entire database’s data to another storage location. Tools such as mysqldump, TiDB Lightning, or third-party backup tools can be used for full backups.
  2. Incremental Backup: Incremental backup only backs up the data changes that have occurred since the last full backup. In TiDB, Binlog can be used to achieve incremental backups. TiDB’s Binlog records all DML (Data Manipulation Language) operations, including inserts, updates, and deletes. By parsing the Binlog, data changes after a specific point in time can be restored. Common tools include TiDB Binlog, TiDB Pump, and third-party backup tools.
  3. Distributed Backup: For large-scale datasets, distributed backup tools can be considered to improve backup efficiency. For example, TiDB Operator can be used in conjunction with the BR (BR: Backup & Restore) tool running on Kubernetes for distributed backups.
| username: zhanggame1 | Original post link

The latest version of Binlog is gradually being phased out of support.

| username: TiDBer_08RNElU3 | Original post link

BR performs a full backup.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.