When using BR to restore a single table from a full backup of the production cluster in a test cluster, do the TiKV nodes need to have the same number of nodes?

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

Original topic: 在测试集群中使用br从生产集群全备中恢复单表,tikv节点需要保证节点数一样么?

| username: dgtgsou

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version] Production Database V6.5.5 Testing Database V7.5.1
[Reproduction Path] What operations were performed that caused the issue
[Encountered Issue: Issue Phenomenon and Impact] Error occurred when restoring a single table in the testing group
[Resource Configuration] Enter TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]


| username: 这里介绍不了我 | Original post link

For production recovery to testing, do you directly use dumpling+lightning for a single table? I couldn’t find the SST files when restoring the production cluster BR backup to the local test environment.

| username: dgtgsou | Original post link

But when I restore a relatively small table, it can be restored successfully.

| username: Daniel-W | Original post link

What is the medium for your backup storage? Isn’t it shared storage?

| username: dgtgsou | Original post link

Using an NFS directory shared by a server.

| username: dgtgsou | Original post link

All TiKV nodes in the directory have crashed.

| username: 这里介绍不了我 | Original post link

:thinking: Judging by the error, it seems like the SST file wasn’t found. How about trying to back up the problematic single table again and then restore it to see if it works?

| username: Daniel-W | Original post link

The test clusters that need to be restored are all mounted with NFS, right? Go check if the backup files are all in this directory.

| username: dgtgsou | Original post link

Successfully backed up a single table using BR on the production database, but still encountering the same error when restoring in the test environment.

| username: dgtgsou | Original post link

I mounted the 3 TiKV nodes in the test environment to the same directories as in the production environment.

| username: zhaokede | Original post link

When restoring a single table from a full backup of the production cluster, the number of TiKV nodes does not necessarily need to match the number in the production cluster.

| username: dgtgsou | Original post link

Okay, thank you.

| username: WinterLiu | Original post link

In this situation, it is recommended to use logical backup and recovery.

| username: caiyfc | Original post link

You need to check whether the backup data is complete. During the backup, each TiKV will only back up the data of its own leader region, so you need to gather the backup data from all TiKVs to have a complete backup.

A reminder: do not use BR across different versions; it is best to use BR between two clusters of the same version.

| username: 鱼跃龙门 | Original post link

Check if the backup of the large table is incomplete. If the versions are different, it is recommended to use logical backup for restoration.