Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: TiDB集群关闭搬迁之后无法启动,TiKV数据完整是否有方法直接使用该DB数据启动
[TiDB Usage Environment] Production Environment
[TiDB Version] V4.0.15
[Reproduction Path] Deployed a cluster on a server, shut down the server, moved and modified the IP, and couldn’t start it. Is it possible to directly use the data in TiKV to start (even if it’s damaged, it’s different from the original disaster recovery)?
[Encountered Problem: Problem Phenomenon and Impact] Want to read the data inside, but moving only the db data from TiKV to the new cluster reports
[“failed to start node: "[src/server/node.rs:207]: cluster ID mismatch, local 7085723406752337168 != remote 7201033680923810856, you are trying to connect to another cluster, please reconnect to the correct PD"”]
Move the PD over as well. The problem now is that you used a new PD, right? Then when TiKV connects to PD, it results in a cluster ID mismatch.
Essentially, you still need to change the IP. You can follow this SOP to fix the PD data.
Master Zhang is indeed knowledgeable 
If TiDB cannot change the IP, you can configure it as a host and set it up with a domain name. This way, you won’t have to worry about changing the IP.
The original PD has been modified. I am now taking over to handle it.
[2023/02/17 17:29:51.582 +08:00] [WARN] [client.rs:106] [“validate PD endpoints failed”] [err=“Other("[components/pd_client/src/util.rs:443]: PD response cluster_id mismatch, want 7201051794948305004, got 7085723406752337168")”]
Got it, thanks. Just move the last_tikv.toml out of the tikv directory.
However, if all data is lost and only one TiKV remains, is there a way to recover it? Even if it’s lossy, it’s fine.
I haven’t encountered this scenario yet, but you can refer to the official documentation on online unsafe recovery: Online Unsafe Recovery 使用文档 | PingCAP 文档中心
Zhang Tianshi is everywhere.
Hurry up and accumulate points to exchange for a charger as soon as possible.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.