How to Distinguish Backup and Restore Files for Each Instance in Single-Machine Multi-Instance TiKV When Using BR for Data Backup and Recovery

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

Original topic: 使用BR备份恢复数据时,对于单机多实例TiKV情况,如何区分每个实例备份和恢复的文件

| username: caorui

[TiDB Usage Environment] Production Environment / Testing / PoC
Testing Environment
[TiDB Version] v4.0.3
[Encountered Problem: Phenomenon and Impact]
When using BR for data backup, the following command is used:
./br backup full --pd “${pd}:2379” --storage “local:///tmp/backup” --ratelimit 128 --log-file backupfull.log
Among them, the path for storing the BR backup files is specified after --storage. However, in the case of multiple TiKV instances on a single machine, how can the data files exported by each TiKV instance be stored in different paths?
Or, does storing data from multiple instances in one path not affect using BR to restore data?
I understand that for multiple instances, it is necessary to read data files from different paths during restoration. I am not sure if this understanding is correct.
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]

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

As long as the path local:///tmp/backup is accessible by all TiKV nodes, it will work. For restoration, you need to place the backup files from all nodes into this directory to proceed with the restoration.

| username: caorui | Original post link

Got it, thank you.

| username: zhanggame1 | Original post link

It is best to place backup files on shared storage for both backup and recovery, so that all TiKV nodes can access them.

| username: caorui | Original post link

My next step is to set up NFS sharing for unified management. The previous question was just about some confusion during the first step.

| username: zhanggame1 | Original post link

I tested with three TiKV instances, each creating three directories named 1, 2, and 3 on NFS, storing their own data separately. Additionally, there is a backupmeta file that records the backup information.

| username: system | Original post link

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