Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: Tikv集群(无tidb)中key超过40万,br备份成功但无法恢复到新的tikv集群;invalid restore range
[TiDB Usage Environment] Testing;
Using br txn for backup and restore, storage location is cephrgw bucket
[TiDB Version] 6.5.3
[Reproduction Path] Operations performed that led to the issue
-
Created two TiKV clusters
-
JuiceFS uses one of the TiKV clusters as the metadata engine and creates 400,000 empty files

-
Successfully backed up using the br tool
-
Error when restoring to a new cluster using the br tool
Error: startKey > endKey, startKey: 6a66733031fd4174ff3804000000000049ff0000000000000000f7, endkey: 0000000000000000f7: [BR:Restore:ErrRestoreInvalidRange] invalid restore range
-
Logs from the br tool
[Encountered Issue: Problem Phenomenon and Impact]
Unable to restore to the new cluster. If anyone has encountered a similar issue, please provide some insights. Thank you.
[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]
I replied to you yesterday 
Uh, you said yesterday that rxn is not supported? It can be successfully restored when the data is less than 400,000. 
This issue is easy to reproduce, but it’s my first time posting.
It’s normal for TiDB to handle several terabytes of data.
If it can be restored today but not tomorrow, the DBA would probably cry…
From the logs you posted, it seems that the region partition range is incorrect. BR will perform a checksum, and the checksum failed.
Sure, without deploying TiDB, only TiKV and PD are deployed; you mentioned that the region partition range is incorrect, how can this be modified?
This cannot be modified; the region range is allocated by PD and is also part of the metadata.
If you are using JuiceFS, just follow the documentation provided by JuiceFS.
Using tikv-br for backup and restore in a rawkv cluster
Or use br backup raw
raw (experimental) backup a raw kv range from TiKV cluster
Refer to this article
Okay, I’m planning to temporarily give up on the BR tool for now, thank you.
Thank you, I’ll temporarily give up on the br tool and try raw another day.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.