BR Incremental Backup Lost DDL

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

Original topic: BR 增量备份丢失ddl

| username: porpoiselxj

[Test Environment for TiDB] Testing
[TiDB Version] v6.1.1
[Encountered Issue]
Tested the full and incremental backup and restore functions of br. After multiple confirmations, it was found that the br incremental backup restore would lose ddl operations. The currently discovered lost operations are truncate table and drop table.

[Reproduction Steps]

  1. Find a test database, first perform a full backup with br and restore it to another database.
  2. Perform various operations on the source database, including dml and ddl.
  3. Use br to perform an incremental backup from the tso of the last full backup and restore it to another database.
  4. It was found that the tested dml could be restored, and ddl operations such as adding and deleting columns were okay, but drop table and truncate table were lost.
| username: h5n1 | Original post link

How long is the GC set? The GC safe point hasn’t exceeded the ts of the full backup, right?

| username: porpoiselxj | Original post link

The GC time is definitely long enough. I set it to 3 hours, and the entire test took less than 10 minutes. Additionally, I first inserted a piece of data, then truncated it, and then inserted another piece. You will find that the replica will end up with two more pieces of data than originally.

| username: OnTheRoad | Original post link

BR incremental backup and restore is an experimental feature, combining both physical and logical methods.