数据备份报错

【 TiDB 使用环境】测试环境
【 TiDB 版本】7.1.2
【遇到的问题:问题现象及影响】
runtime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1598"] [unit-name=“range start:74800000000000162d5f69800000000000000400 end:74800000000000162d5f698000000000000004fb”] [error=“rpc error: code = Canceled desc = context canceled”] [errorVerbose=“rpc error: code = Canceled desc = context canceled\ngithub.com/tikv/pd/client.(*client).respForErr\n\t/go/pkg/mod/github.com/tikv/pd/client@v0.0.0-20230905092614-113cdedbebb6/client.go:1313\ngithub.com/tikv/pd/client.(*client).GetAllStores\n\t/go/pkg/mod/github.com/tikv/pd/client@v0.0.0-20230905092614-113cdedbebb6/client.go:920\ngithub.com/pingcap/tidb/br/pkg/conn/util.GetAllTiKVStores\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/conn/util/util.go:48\ngithub.com/pingcap/tidb/br/pkg/conn.GetAllTiKVStoresWithRetry.func1\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/conn/conn.go:83\ngithub.com/pingcap/tidb/br/pkg/utils.WithRetry.func1\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/utils/retry.go:57\ngithub.com/pingcap/tidb/br/pkg/utils.WithRetryV2[…]\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/utils/retry.go:75\ngithub.com/pingcap/tidb/br/pkg/utils.WithRetry\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/utils/retry.go:56\ngithub.com/pingcap/tidb/br/pkg/conn.GetAllTiKVStoresWithRetry\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/conn/conn.go:80\ngithub.com/pingcap/tidb/br/pkg/backup.(*Client).BackupRange\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/backup/client.go:917\ngithub.com/pingcap/tidb/br/pkg/backup.(*Client).BackupRanges.func2\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/backup/client.go:876\ngithub.com/pingcap/tidb/br/pkg/utils.(*WorkerPool).ApplyOnErrorGroup.func1\n\t/home/jenkins/agent/workspace/build-common/go/src/github.com/pingcap/br/br/pkg/utils/worker.go:76\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\t/go/pkg/mod/golang.org/x/sync@v0.2.0/errgroup/errgroup.go:75\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1598”]
Error: error happen in store 1 a xxx.xx.xxx.xx:20160: File or directory not found on TiKV Node (store id: 1; Address: xxx.xx.xxx.xx:20160). work around:please ensure br and tikv nodes share a same storage and the user of br and tikv has same uid.: [BR:KV:ErrKVStorage]tikv storage occur I/O error
Table Backup <…> 0.00%
[tidb@zy-nph-zf-test-bigdbvm-haproxy01 v7.1.2]$

看着像是没有使用share storage,先把备份命令发下吧!

如果是没有使用share storage的话,需要确认每个node上面都要有相同的备份目标目录!

./br backup table --pd xxx.xx.xxx.xx:2379 --db typayv2 --table t_thirddepositorder_history --storage /data/software/tidbbackup --ratelimit 128 --log-file /data/software/tidbbackup/t_thirddepositorder_history.log

1.确定 报错xxx.xx.xxx.xx:20160上/data/software/tidbbackup目录是否存在
2.确定权限,参考
https://docs.pingcap.com/zh/tidb/stable/backup-and-restore-faq#遇到-permission-denied-或者-no-such-file-or-directory-错误即使用-root-运行-br-命令行工具也无法解决该如何处理

1 个赞

挂个NFS,挂在每个tikv 节点下面,路径一致就好了

每个tikv节点下都需要创建这个目录并赋权

所以报错的原因是什么?

路径权限问题

嗯,路径权限

a xxx.xx.xxx.xx:20160: File or directory not found on TiKV Node (store id: 1; Address: xxx.xx.xxx.xx:20160). work around:please ensure br and tikv nodes share a same storage
本地存储需要创建相同的路径和 权限

路径的权限问题,每个tikv挂载nas

此话题已在最后回复的 60 天后被自动关闭。不再允许新回复。