为提高效率,提问时请提供以下信息,问题描述清晰可优先响应。
- 【TiDB 版本】:4.0.8
- 【问题描述】:
使用br进行备份,开始的时候备份目录忘记了给tidb用户加入写权限,导致没有写进去,报了一个io错误
给备份目录加上写权限后,再次执行,报错日志如下
备份目录是空的,我不知道哪里还有多余的文件
备份命令 br backup full --pd “192.168.1.131:2379” -s “local:///data/tidata/brdata” --ratelimit 50
若提问为性能优化、故障排查类问题,请下载脚本运行。终端输出打印结果,请务必全选并复制粘贴上传。
我把这个目录删除了,然后重新创建的,还是不行,还是报那个错误
[root@bj111 tiup]# tidb-toolkit-v4.0.8/bin/br backup full --pd “192.168.1.131:2379” -s “local:///data/tidata/brdata” --ratelimit 50
Detail BR log in /tmp/br.log.2021-01-08T11.43.59+0800
Error: backup lock exists, may be some backup files in the path already: [BR:Common:ErrInvalidArgument]invalid argument
[root@bj111 tiup]# more /tmp/br.log.2021-01-08T11.43.59+0800
[2021/01/08 11:43:59.944 +08:00] [INFO] [version.go:37] [“Welcome to Backup & Restore (BR)”]
[2021/01/08 11:43:59.944 +08:00] [INFO] [version.go:38] [BR] [release-version=v4.0.8]
[2021/01/08 11:43:59.944 +08:00] [INFO] [version.go:39] [BR] [git-hash=c2ed897feadaae1ae27a4111cd44b1840941e9be]
[2021/01/08 11:43:59.944 +08:00] [INFO] [version.go:40] [BR] [git-branch=heads/refs/tags/v4.0.8]
[2021/01/08 11:43:59.944 +08:00] [INFO] [version.go:41] [BR] [go-version=go1.13]
[2021/01/08 11:43:59.944 +08:00] [INFO] [version.go:42] [BR] [utc-build-time=“2020-10-30 08:14:21”]
[2021/01/08 11:43:59.944 +08:00] [INFO] [version.go:43] [BR] [race-enabled=false]
[2021/01/08 11:43:59.944 +08:00] [INFO] [common.go:429] [arguments] [pd="[192.168.1.131:2379]"] [ratelimit=50] [storage=local:///data/tidata/brdata]
[2021/01/08 11:43:59.944 +08:00] [INFO] [client.go:166] ["[pd] create pd client with endpoints"] [pd-address="[192.168.1.131:2379]"]
[2021/01/08 11:43:59.946 +08:00] [INFO] [base_client.go:236] ["[pd] update member urls"] [old-urls="[http://192.168.1.131:2379]"] [new-urls="[http://192.168.1.127:2379,http://192.168.1.128:
2379,http://192.168.1.131:2379]"]
[2021/01/08 11:43:59.946 +08:00] [INFO] [base_client.go:252] ["[pd] switch leader"] [new-leader=http://192.168.1.127:2379] [old-leader=]
[2021/01/08 11:43:59.947 +08:00] [INFO] [base_client.go:102] ["[pd] init cluster id"] [cluster-id=6899677217552501735]
[2021/01/08 11:43:59.950 +08:00] [INFO] [client.go:166] ["[pd] create pd client with endpoints"] [pd-address="[192.168.1.131:2379]"]
[2021/01/08 11:43:59.952 +08:00] [INFO] [base_client.go:236] ["[pd] update member urls"] [old-urls="[http://192.168.1.131:2379]"] [new-urls="[http://192.168.1.127:2379,http://192.168.1.128:
2379,http://192.168.1.131:2379]"]
[2021/01/08 11:43:59.952 +08:00] [INFO] [base_client.go:252] ["[pd] switch leader"] [new-leader=http://192.168.1.127:2379] [old-leader=]
[2021/01/08 11:43:59.952 +08:00] [INFO] [base_client.go:102] ["[pd] init cluster id"] [cluster-id=6899677217552501735]
[2021/01/08 11:43:59.953 +08:00] [INFO] [conn.go:129] [“new mgr”] [pdAddrs=192.168.1.131:2379]
[2021/01/08 11:43:59.954 +08:00] [INFO] [tidb.go:71] [“new domain”] [store=tikv-6899677217552501735] [“ddl lease”=1s] [“stats lease”=-1ns] [“index usage sync lease”=1m0s]
[2021/01/08 11:43:59.965 +08:00] [INFO] [ddl.go:323] ["[ddl] start DDL"] [ID=d9395514-a822-4832-8708-cd4f516d040f] [runWorker=false]
[2021/01/08 11:43:59.989 +08:00] [INFO] [domain.go:147] [“full load InfoSchema success”] [usedSchemaVersion=0] [neededSchemaVersion=1840] [“start time”=13.211505ms]
[2021/01/08 11:43:59.990 +08:00] [INFO] [domain.go:381] [“full load and reset schema validator”]
[2021/01/08 11:43:59.990 +08:00] [INFO] [client.go:83] [“new backup client”]
[2021/01/08 11:43:59.991 +08:00] [INFO] [ddl.go:391] ["[ddl] DDL closed"] [ID=d9395514-a822-4832-8708-cd4f516d040f] [“take time”=971.881µs]
[2021/01/08 11:43:59.991 +08:00] [INFO] [ddl.go:304] ["[ddl] stop DDL"] [ID=d9395514-a822-4832-8708-cd4f516d040f]
[2021/01/08 11:43:59.993 +08:00] [INFO] [domain.go:457] [“infoSyncerKeeper exited.”]
[2021/01/08 11:43:59.994 +08:00] [INFO] [domain.go:516] [“loadSchemaInLoop exited.”]
[2021/01/08 11:43:59.994 +08:00] [INFO] [domain.go:428] [“topNSlowQueryLoop exited.”]
[2021/01/08 11:43:59.994 +08:00] [INFO] [domain.go:637] [“domain closed”] [“take time”=3.502086ms]
[2021/01/08 11:43:59.994 +08:00] [INFO] [collector.go:187] [“Full backup Failed summary : total backup ranges: 0, total success: 0, total failed: 0”]
[2021/01/08 11:43:59.994 +08:00] [ERROR] [backup.go:25] [“failed to backup”] [error=“backup lock exists, may be some backup files in the path already: [BR:Common:ErrInvalidArgument]invalid
argument”] [errorVerbose="[BR:Common:ErrInvalidArgument]invalid argument\
backup lock exists, may be some backup files in the path already\ngithub.com/pingcap/br/pkg/backup.(*Client).SetSto
rage\
\tgithub.com/pingcap/br@/pkg/backup/client.go:171\
github.com/pingcap/br/pkg/task.RunBackup\
\tgithub.com/pingcap/br@/pkg/task/backup.go:190\
github.com/pingcap/br/cmd.runBackupComman
d\
\tgithub.com/pingcap/br@/cmd/backup.go:24\
github.com/pingcap/br/cmd.newFullBackupCommand.func1\
\tgithub.com/pingcap/br@/cmd/backup.go:84\
github.com/spf13/cobra.(*Command).execute\
\tg
ithub.com/spf13/cobra@v1.0.0/command.go:842\
github.com/spf13/cobra.(*Command).ExecuteC\
\tgithub.com/spf13/cobra@v1.0.0/command.go:950\
github.com/spf13/cobra.(*Command).Execute\
\tgithub.
com/spf13/cobra@v1.0.0/command.go:887\
main.main\
\tgithub.com/pingcap/br@/main.go:58\
runtime.main\
\truntime/proc.go:203\
runtime.goexit\
\truntime/asm_amd64.s:1357"] [stack=“github.com/p
ingcap/br/cmd.runBackupCommand\
\tgithub.com/pingcap/br@/cmd/backup.go:25\
github.com/pingcap/br/cmd.newFullBackupCommand.func1\
\tgithub.com/pingcap/br@/cmd/backup.go:84\
github.com/spf13/
cobra.(*Command).execute\
\tgithub.com/spf13/cobra@v1.0.0/command.go:842\
github.com/spf13/cobra.(*Command).ExecuteC\
\tgithub.com/spf13/cobra@v1.0.0/command.go:950\
github.com/spf13/cobra.
(*Command).Execute\
\tgithub.com/spf13/cobra@v1.0.0/command.go:887\
main.main\
\tgithub.com/pingcap/br@/main.go:58\
runtime.main\
\truntime/proc.go:203”]
[2021/01/08 11:43:59.994 +08:00] [ERROR] [main.go:59] [“br failed”] [error=“backup lock exists, may be some backup files in the path already: [BR:Common:ErrInvalidArgument]invalid argument”
] [errorVerbose="[BR:Common:ErrInvalidArgument]invalid argument\
backup lock exists, may be some backup files in the path already\ngithub.com/pingcap/br/pkg/backup.(*Client).SetStorage\
\tg
ithub.com/pingcap/br@/pkg/backup/client.go:171\
github.com/pingcap/br/pkg/task.RunBackup\
\tgithub.com/pingcap/br@/pkg/task/backup.go:190\
github.com/pingcap/br/cmd.runBackupCommand\
\tgith
ub.com/pingcap/br@/cmd/backup.go:24\
github.com/pingcap/br/cmd.newFullBackupCommand.func1\
\tgithub.com/pingcap/br@/cmd/backup.go:84\
github.com/spf13/cobra.(*Command).execute\
\tgithub.com
/spf13/cobra@v1.0.0/command.go:842\ngithub.com/spf13/cobra.(*Command).ExecuteC\
\tgithub.com/spf13/cobra@v1.0.0/command.go:950\
github.com/spf13/cobra.(*Command).Execute\
\tgithub.com/spf13
/cobra@v1.0.0/command.go:887\
main.main\
\tgithub.com/pingcap/br@/main.go:58\
runtime.main\
\truntime/proc.go:203\
runtime.goexit\
\truntime/asm_amd64.s:1357"] [stack=“main.main\
\tgithub.c
om/pingcap/br@/main.go:59\
runtime.main\
\truntime/proc.go:203”]
我找到问题了,我这个控制机上面有个目录里面有文件,没有删除,多谢您了。我备份完之后,直接把原来的集群摧毁,然后重新创建一个新集群,因为之前用的是机械硬盘,想换成ssd的盘目录,您认为是直接摧毁重新创建好,还是通过节点的扩缩容比较好,现在这个集群是没有使用的。
老师,能帮忙看看https://asktug.com/t/topic/68104 吗?
system
(system)
关闭
14
此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。