BR 备份测试-单库备份失败

为提高效率,请提供以下信息,问题描述清晰能够更快得到解决:
【 TiDB 使用环境】
v5.0.0

【概述】 场景 + 问题概述
测试单库 BR 备份

[root@CLOUD-TIDB-01 /root/tidb-toolkit-v5.0.1-linux-amd64/bin]$tiup cluster display tidb-test
Starting component cluster: /root/.tiup/components/cluster/v1.5.6/tiup-cluster display tidb-test
Cluster type: tidb
Cluster name: tidb-test
Cluster version: v5.0.0
Deploy user: tidb
SSH type: builtin
Dashboard URL: http://192.168.8.72:2379/dashboard
ID Role Host Ports OS/Arch Status Data Dir Deploy Dir


192.168.8.71:9093 alertmanager 192.168.8.71 9093/9094 linux/x86_64 Up /tidb-data/alertmanager-9093 /tidb-deploy/alertmanager-9093
192.168.8.71:3000 grafana 192.168.8.71 3000 linux/x86_64 Up - /tidb-deploy/grafana-3000
192.168.8.71:2379 pd 192.168.8.71 2379/2380 linux/x86_64 Up /tidb-data/pd-2379 /tidb-deploy/pd-2379
192.168.8.72:2379 pd 192.168.8.72 2379/2380 linux/x86_64 Up|L|UI /tidb-data/pd-2379 /tidb-deploy/pd-2379
192.168.8.73:2379 pd 192.168.8.73 2379/2380 linux/x86_64 Up /tidb-data/pd-2379 /tidb-deploy/pd-2379
192.168.8.71:9090 prometheus 192.168.8.71 9090 linux/x86_64 Up /tidb-data/prometheus-9090 /tidb-deploy/prometheus-9090
192.168.8.77:4000 tidb 192.168.8.77 4000/10080 linux/x86_64 Up - /tidb-deploy/tidb-4000
192.168.8.74:20160 tikv 192.168.8.74 20160/20180 linux/x86_64 Up /tidb-data/tikv-20160 /tidb-deploy/tikv-20160
192.168.8.75:20160 tikv 192.168.8.75 20160/20180 linux/x86_64 Up /tidb-data/tikv-20160 /tidb-deploy/tikv-20160
192.168.8.76:20160 tikv 192.168.8.76 20160/20180 linux/x86_64 Up /tidb-data/tikv-20160 /tidb-deploy/tikv-20160
Total nodes: 10

【背景】 做过哪些操作
[root@CLOUD-TIDB-01 /root/tidb-toolkit-v5.0.1-linux-amd64/bin]$./br backup db --pd “192.168.8.71:2379” --db employees --storage “local:///tmp/employeesbk” --ratelimit 120 --log-file backupdb.log
Detail BR log in backupdb.log

【现象】 业务和数据库现象

[root@CLOUD-TIDB-01 /root/tidb-toolkit-v5.0.1-linux-amd64/bin]$cat backupdb.log
[2021/09/10 23:08:18.274 +08:00] [INFO] [info.go:40] [“Welcome to Backup & Restore (BR)”] [release-version=v5.0.1] [git-hash=b3bd5495369244cfb1d3f2c49763a7fdb55d4ecd] [git-branch=heads/refs/tags/v5.0.1] [go-version=go1.13] [utc-build-time=“2021-04-23 06:02:57”] [race-enabled=false]
[2021/09/10 23:08:18.274 +08:00] [INFO] [common.go:471] [arguments] [__command=“br backup db”] [db=employees] [log-file=backupdb.log] [pd="[192.168.8.71:2379]"] [ratelimit=120] [storage=local:///tmp/employeesbk]
[2021/09/10 23:08:18.274 +08:00] [INFO] [client.go:214] ["[pd] create pd client with endpoints"] [pd-address="[192.168.8.71:2379]"]
[2021/09/10 23:08:18.276 +08:00] [INFO] [base_client.go:334] ["[pd] update member urls"] [old-urls="[http://192.168.8.71:2379]"] [new-urls="[http://192.168.8.71:2379,http://192.168.8.72:2379,http://192.168.8.73:2379]"]
[2021/09/10 23:08:18.276 +08:00] [INFO] [base_client.go:346] ["[pd] switch leader"] [new-leader=http://192.168.8.72:2379] [old-leader=]
[2021/09/10 23:08:18.276 +08:00] [INFO] [base_client.go:126] ["[pd] init cluster id"] [cluster-id=7004818833511470976]
[2021/09/10 23:08:18.276 +08:00] [INFO] [client.go:238] ["[pd] create tso dispatcher"] [dc-location=global]
[2021/09/10 23:08:18.280 +08:00] [INFO] [client.go:214] ["[pd] create pd client with endpoints"] [pd-address="[192.168.8.71:2379]"]
[2021/09/10 23:08:18.281 +08:00] [INFO] [base_client.go:334] ["[pd] update member urls"] [old-urls="[http://192.168.8.71:2379]"] [new-urls="[http://192.168.8.71:2379,http://192.168.8.72:2379,http://192.168.8.73:2379]"]
[2021/09/10 23:08:18.282 +08:00] [INFO] [base_client.go:346] ["[pd] switch leader"] [new-leader=http://192.168.8.72:2379] [old-leader=]
[2021/09/10 23:08:18.282 +08:00] [INFO] [base_client.go:126] ["[pd] init cluster id"] [cluster-id=7004818833511470976]
[2021/09/10 23:08:18.282 +08:00] [INFO] [client.go:238] ["[pd] create tso dispatcher"] [dc-location=global]
[2021/09/10 23:08:18.283 +08:00] [INFO] [conn.go:206] [“new mgr”] [pdAddrs=192.168.8.71:2379]
[2021/09/10 23:08:18.283 +08:00] [INFO] [client.go:86] [“new backup client”]
[2021/09/10 23:08:18.286 +08:00] [INFO] [client.go:130] [“backup encode timestamp”] [BackupTS=427631967792529410]
[2021/09/10 23:08:18.286 +08:00] [INFO] [backup.go:261] [“current backup safePoint job”] [safePoint="{ID=br-4d846036-8604-4c93-8bb6-6c61a150566b,TTL=5m0s,BackupTime=“2021-09-10 23:08:18.232 +0800 CST”,BackupTS=427631967792529410}"]
[2021/09/10 23:08:18.305 +08:00] [INFO] [client.go:383] [“nothing to backup”]
[2021/09/10 23:08:18.305 +08:00] [WARN] [backup.go:312] [“Nothing to backup, maybe connected to cluster for restoring”] [“PD address”=192.168.8.71:2379]
[2021/09/10 23:08:18.305 +08:00] [INFO] [client.go:219] [“save backup meta”] [path=local:///tmp/employeesbk] [size=233]
[2021/09/10 23:08:18.305 +08:00] [INFO] [client.go:510] ["[pd] exit tso dispatcher"] [dc-location=global]
[2021/09/10 23:08:18.306 +08:00] [INFO] [collector.go:191] [“Database backup failed summary”] [total-ranges=0] [ranges-succeed=0] [ranges-failed=0] [BackupTS=427631967792529410]

【问题】 当前遇到的问题
没有备份成功,集群状态正常。

【业务影响】

【TiDB 版本】
v5.0.0

【附件】

  • 相关日志、配置文件、Grafana 监控(https://metricstool.pingcap.com/)
  • TiUP Cluster Display 信息
  • TiUP CLuster Edit config 信息
  • TiDB-Overview 监控
  • 对应模块的 Grafana 监控(如有 BR、TiDB-binlog、TiCDC 等)
  • 对应模块日志(包含问题前后 1 小时日志)

若提问为性能优化、故障排查类问题,请下载脚本运行。终端输出的打印结果,请务必全选并复制粘贴上传。

1赞

数据库是存在的

[mysql@CLOUD-DBS-02 /home/mysql]$mysql -h 192.168.8.77 -P 4000 -uroot
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.7.25-TiDB-v5.0.0 TiDB Server (Apache License 2.0) Community Edition, MySQL 5.7 compatible

Copyright © 2000, 2020, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

(root@192.168.8.77)[(none)]>use employeesbk
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
(root@192.168.8.77)[employeesbk]>show tables;
±----------------------+
| Tables_in_employeesbk |
±----------------------+
| cloud |
| test |
±----------------------+
2 rows in set (0.00 sec)

你的–db参数值写错了吧,看你的库是叫employeesbk。

:rofl: 谢谢你,大意了。