TiDB BR Backup

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

Original topic: tidb br备份

| username: Wander

[TiDB Usage Environment] Production Environment / Testing / Poc
[TiDB Version]
[Reproduction Path] What operations were performed to encounter the issue
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration] Enter TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots / Logs / Monitoring]

Using br for backup, the error is as follows:
[2023/09/13 10:18:20.231 +08:00] [INFO] [collector.go:73] [“Full Backup failed summary”] [total-ranges=3701] [ranges-succeed=3701] [ranges-failed=0] [backup-total-ranges=3366]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x3ad0b28]

goroutine 1 [running]:
github.com/pingcap/tidb/br/pkg/backup.(*Schemas).BackupSchemas(0xc001e3b180, {0x53ca010, 0xc000eaa800}, 0xc0026585a0, 0xc002d4b680, {0x53f22d0?, 0xc0012e2320}, 0x0, 0x62a287c36f0000a, 0x40, …)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/backup/schema.go:116 +0x568
github.com/pingcap/tidb/br/pkg/task.RunBackup({0x53ca010, 0xc000b4f780}, {0x53e2be0?, 0x7c76808?}, {0x4c6c475, 0xb}, 0xc0006d6e00)
/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/task/backup.go:631 +0x24bd

The br version is also 6.5.0

| username: Kongdom | Original post link

It looks like a memory allocation address conflict. Could it be a bug?

| username: ffeenn | Original post link

Issue the backup command.

| username: Wander | Original post link

/usr/sbin/br backup full --pd “ip:2379” --storage “local:///data/backup/date +%Y%m%d” --log-file /data/backup/logs/date +%Y%m%d-backup.log

| username: ffeenn | Original post link

This date wasn’t executed, right? Try enclosing it with `` or $().

| username: Wander | Original post link

The script is there, but when I paste it or send it, it doesn’t display.

| username: ffeenn | Original post link

Directly enter the command in the command line to back up again, and then upload the backuptable.log.

| username: Wander | Original post link

Let’s do it tomorrow. I just ran it manually, and it’s working again. :mask: It might be because the system was modified. I’ll observe it again tomorrow.

| username: ffeenn | Original post link

Okay, let’s observe and see.