BR恢复报错

[root@vm10-2-103-28 test_yp]# tiup br restore db --db tpch --storage “/home/tidb/test_yp/backup02” --pd “10.2.103.28:2433” --with-sys-table --log-file restore02.log
Starting component br: /root/.tiup/components/br/v8.5.1/br restore db --db tpch --storage /home/tidb/test_yp/backup02 --pd 10.2.103.28:2433 --with-sys-table --log-file restore02.log
Detail BR log in restore02.log
[2025/02/26 15:43:19.807 +08:00] [INFO] [collector.go:77] [“DataBase Restore failed summary”] [total-ranges=0] [ranges-succeed=0] [ranges-failed=0]
Error: The current snapshot restore want to restore cluster to the BackupTS[456275750692585473], which is different from that[456275236995203076] recorded in checkpoint. Perhaps you should specify the last full backup storage instead, or just clean the checkpoint database[__TiDB_BR_Temporary_Snapshot_Restore_Checkpoint] if the cluster has been cleaned up.
各位老师,已经full backup成功,但是full restore的时候报错,请教下,这个是要把源库的所有数据库都删掉吗

参考这里https://docs.pingcap.com/zh/tidb/stable/sql-statement-restore#restore


这个意思是,先stop集群?然后这个restore是哪个窗口执行呢

2楼应该在强调下面这点吧

  • 执行全量恢复时,确保即将恢复的表不存在于集群中,因为现有的数据可能被覆盖,从而导致数据与索引不一致。

现在的问题是集群的backupts是

select TIDB_PARSE_TSO(456275750692585473); – 2025-02-26 07:10:58.538000

而你给的备份记录的checkpoint是

select TIDB_PARSE_TSO(456275236995203076); – 2025-02-26 06:38:18.938000

所以怀疑你没有使用最新的备份,这样恢复的时候不就过期的数据覆盖新的数据,出问题了么。

提示还告诉你,如果你确定没有问题,就直接把[__TiDB_BR_Temporary_Snapshot_Restore_Checkpoint] 这个名字的库删掉。就会用过期的数据覆盖新的数据,继续恢复。

大致是这么个意思。

1 个赞

BR 还原目标集群推荐是空的,别有重复数据。

1 个赞

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