BR backup can only be performed in the installation path and cannot specify a path

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

Original topic: br备份只能在安装路径备份无法指定路径

| username: bryanz

【TiDB Usage Environment】Production Environment
【TiDB Version】v7.1.1
【Reproduction Path】BR backup can only be performed in the installation path and cannot specify a different path. Backup is successful in the installation path.
【Encountered Problem: Problem Phenomenon and Impact】File or directory not found on TiKV Node

| username: 有猫万事足 | Original post link

If it is a local backup, you need to ensure that there is a corresponding folder on each TiKV.

Why do you think it can only be backed up successfully in the installation path?
Because obviously, each TiKV has a common installation path.

So, try running the following command:

tiup cluster exec [cluster-name] --command "pwd" -R tikv

This command means to execute the pwd command on all TiKV nodes using the tidb user.

You can replace the pwd command with mkdir [dirpath] to let tiup cluster create the same directory on each TiKV, and then execute the BR backup.

| username: come_true | Original post link

Each node must have a directory present.

| username: come_true | Original post link

It is covered in the 301 course.

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

It is recommended to use NFS or S3. Using a local directory requires creating the same directory on all TiKV nodes.

| username: bryanz | Original post link

It is stuck on the same path, it must be the same path.

| username: bryanz | Original post link

What if there’s only local storage? If I use local storage and create backup directories based on time, do I have to create time directories on all TiKV nodes every time I back up?

| username: bryanz | Original post link

After the command was successfully executed, the backup file generated was very small, and there was no data in the directory.

| username: Jolyne | Original post link

You can perform incremental backups, first restore the full backup once, and then restore the incremental data.

| username: zhanggame1 | Original post link

You’re right, it indeed needs to be done this way.

| username: bryanz | Original post link

The first time it failed to back up successfully.

| username: bryanz | Original post link

I just want to back up a single database now. For single database backup, I can only use BR, right?

| username: Jolyne | Original post link

If the data volume is not large, you can use Dumpling.

| username: bryanz | Original post link

Can dumpling back up a single database? I’ve checked around and it seems dumpling can’t back up a single database.

| username: zhanggame1 | Original post link

Dumpling can back up a single database.
To back up two databases: dev_vegas2 and test_vegas2

tiup dumpling -uroot -p “XXXX” -P 3390 -h 192.168.24.200 --filetype sql -t 8 -o “/tmp/dumpling” -r 200000 -F256MiB -B dev_vegas2 -B test_vegas2

| username: bryanz | Original post link

Thank you. Then I can only switch to dumpling.

| username: heiwandou | Original post link

Try using dumpling.

| username: bryanz | Original post link

Okay, thank you.

| username: dba远航 | Original post link

Each KV must have a path.

| username: come_true | Original post link

That indicates the backup was not successful. Please check the backup command again.