【 TiDB 使用环境】生产环境
【 TiDB 版本】7.5.3
现有两套TIDB集群,
Ti-A集群中有数据库 DB-1/DB-2/DB3
Ti-b集群中有数据库 DB-4/DB-5/DB6/DB-7
需要根据业务重要程度调整TIDB集群,
新增了两套TIDB集群
NewTi-A 和 NewTi-B ,但是目前需要把
Ti-A集群中的DB-1/DB-2 和 Ti-b集群中 DB6/DB-7 迁移到 NewTi-A集群中
Ti-A集群中的DB-3 和 Ti-b集群中 DB4/DB-5 迁移到 NewTi-B集群中
所以实际是按照数据库维度迁移的。 先迁移了 Ti-A集群中 DB-1 到了 NewTi-A集群中 DB-1,但是DB-1 有cdc同步数据到kafka的需求,迁移完成 DB-1 之后,cdc已经正常运行中。
目前按照备份完毕DB-2,准备进行restore恢复到 NewTi-A集群中的时候报错,提示error="failed to check task exists: found CDC changefeed(s) ... ... please stop changefeed(s) before restore"
详细日志参考如下
[2025/05/27 18:21:46.518 +08:00] [ERROR] [restore.go:64] ["failed to restore"] [error="failed to check task exists: found CDC changefeed(s): cluster/namespace: default/default changefeed(s): [tidb-primary-db1], please stop changefeed(s) before restore"] [errorVerbose="found CDC changefeed(s): cluster/namespace: default/default changefeed(s): [tidb-primary-db1], please stop changefeed(s) before restore\ngithub.com/pingcap/tidb/br/pkg/task.checkTaskExists\n\t/workspace/source/tidb/br/pkg/task/stream.go:1128\ngithub.com/pingcap/tidb/br/pkg/task.RunRestore\n\t/workspace/source/tidb/br/pkg/task/restore.go:604\nmain.runRestoreCommand\n\t/workspace/source/tidb/br/cmd/br/restore.go:63\nmain.newDBRestoreCommand.func1\n\t/workspace/source/tidb/br/cmd/br/restore.go:183\ngithub.com/spf13/cobra.(*Command).execute\n\t/root/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:940\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/root/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068\ngithub.com/spf13/cobra.(*Command).Execute\n\t/root/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992\nmain.main\n\t/workspace/source/tidb/br/cmd/br/main.go:58\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:267\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1650\nfailed to check task exists"] [stack="main.runRestoreCommand\n\t/workspace/source/tidb/br/cmd/br/restore.go:64\nmain.newDBRestoreCommand.func1\n\t/workspace/source/tidb/br/cmd/br/restore.go:183\ngithub.com/spf13/cobra.(*Command).execute\n\t/root/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:940\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/root/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068\ngithub.com/spf13/cobra.(*Command).Execute\n\t/root/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992\nmain.main\n\t/workspace/source/tidb/br/cmd/br/main.go:58\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:267"]
[2025/05/27 18:21:46.518 +08:00] [ERROR] [main.go:60] ["br failed"] [error="failed to check task exists: found CDC changefeed(s): cluster/namespace: default/default changefeed(s): [tidb-primary-db1], please stop changefeed(s) before restore"] [errorVerbose="found CDC changefeed(s): cluster/namespace: default/default changefeed(s): [tidb-primary-db1], please stop changefeed(s) before restore\ngithub.com/pingcap/tidb/br/pkg/task.checkTaskExists\n\t/workspace/source/tidb/br/pkg/task/stream.go:1128\ngithub.com/pingcap/tidb/br/pkg/task.RunRestore\n\t/workspace/source/tidb/br/pkg/task/restore.go:604\nmain.runRestoreCommand\n\t/workspace/source/tidb/br/cmd/br/restore.go:63\nmain.newDBRestoreCommand.func1\n\t/workspace/source/tidb/br/cmd/br/restore.go:183\ngithub.com/spf13/cobra.(*Command).execute\n\t/root/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:940\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/root/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:1068\ngithub.com/spf13/cobra.(*Command).Execute\n\t/root/go/pkg/mod/github.com/spf13/cobra@v1.7.0/command.go:992\nmain.main\n\t/workspace/source/tidb/br/cmd/br/main.go:58\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:267\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_amd64.s:1650\nfailed to check task exists"] [stack="main.main\n\t/workspace/source/tidb/br/cmd/br/main.go:60\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:267"]
cdc 同步数据到Kafka是生产业务需要。 目前不能停止呢,
大佬们有没有其他解决方案和建议啊?