Docs
tidb
Operation Guide
TiDBServerless
Binlog synchronization

Binlog Synchronization

The Binlog synchronization function can synchronize the incremental data of TiDB to other storages in real time. Supports MySQL, TiDB, Kafka, and US3 as target storages.

Enter the Management Page

Find the corresponding instance on the product homepage and click the “Details” button to enter the details page.

Enable Binlog

Switch to the “Binlog Synchronization” panel

Binlog synchronization service is not enabled by default, click the “Synchronization Service” switch to open the enablement window

Set the Binlog retention period, default to “7”, save for 7 days (supported range 1 ~ 14 days).

After successful activation, the status of “Synchronization Service” will be updated to “Activated”

Full Data Migration, Record CommitTS Data

It is recommended to use UDTS for a full migration. After a successful full migration, UDTS will return the CommitTS data.

If the current database is empty or there is no need to migrate the stock data, you don’t need to carry out a full migration by clicking the “Get CommitTS” button to get the current CommitTS.

Add Consumer

Click the “Add Consumer” button to open the addition window, you can add multiple consumers for an instance.

Choose MySQL protocol consumers (such as MySQL databases, TiDB databases, or other databases compatible with the MySQL protocol), or Kafka, and enter the CommitTS data and other necessary information obtained in the previous step to complete the addition.

View Consumer

In the “Step Three: Binlog Consumer”, it will list the currently available consumers, and you can view the consumer list corresponding to different protocols based on the top right corner.

Delete Consumer

When you need to delete a consumer, you can delete it in the consumer list through the “Delete” button.

Modify Binlog GC

The retention period of Binlog can be set when the Binlog function is enabled, or it can be adjusted by clicking the “BinlogGC” editing button after the Binlog is turned on.

Close Binlog

It is recommended to close the Binlog service when the Binlog function is no longer needed. This can not only reduce costs but also improve performance.

All consumers must be deleted before closing Binlog.

Click on the “Synchronization Service” switch in “Step One: Binlog Synchronization Service” to turn off the Binlog service.