Can BR restore specific tables to the production environment?

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

Original topic: br可以恢复特定的表到生产环境中么?

| username: lindoubled

TiDB version: v5.3.0

Question:
Can I use BR to back up a table from the TiDB test environment and directly restore this table to the production environment TiDB (in an online, non-stop manner)?

| username: xfworld | Original post link

When restoring, it must be with the same database name and table name. It can be done without shutting down, but it will have some impact on production because TiKV needs to perform data import, which requires IO, memory, CPU, network resources, etc.

| username: Kongdom | Original post link

Note, BR is a physical backup, not a logical backup. It is impossible to restore a physical backup without downtime.

| username: ealam_小羽 | Original post link

In this scenario, can we almost consider that the online table can be directly replaced with the test environment table? In that case, using a data import tool might be more appropriate.


If the environments are not compatible and the table is not too large, you can also use mysqldump+source in a more straightforward manner, which will have less impact.
To avoid extreme situations, be sure to back up or copy the online table. If there are issues, you can restore it by changing the table name.
Of course, if you must use BR, you can consider it, but it is not recommended.

  1. Backup to a network disk to reduce pressure

    TiDB 备份与恢复实践示例 | PingCAP 文档中心
  2. Restore directly from a storage

    https://docs.pingcap.com/zh/tidb/stable/br-usage-restore#恢复单张表的数据
    However, note the performance impact of BR restore:

    https://docs.pingcap.com/zh/tidb/stable/br-usage-restore#恢复性能和影响
| username: Cabbager | Original post link

It is not recommended to restore to an online cluster.

| username: forever | Original post link

Single table migration: Dumpling (exports data stored in TiDB or MySQL to SQL or CSV format) + Lightning (imports full data into the TiDB cluster at high speed), logical export and import.

| username: lindoubled | Original post link

If it’s a large table, using the lightning method is too slow.

| username: system | Original post link

This topic will be automatically closed 60 days after the last reply. No new replies are allowed.