How to Recover Tiup Control Machine After Being Cleaned Without Backup?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: Tiup中控机被清理了,无备份如何恢复?

| username: songxuecheng

【TiDB Usage Environment】Production Environment / Testing / PoC
【TiDB Version】
【Reproduction Path】What operations were performed when the issue occurred
【Encountered Issue: Issue Phenomenon and Impact】
The machine was deleted, no backup, the cluster is normal, tiup machine needs to be restored.

【Resource Configuration】Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
【Attachments: Screenshots / Logs / Monitoring】

| username: shigp_TIDBER | Original post link

Without a backup, it probably can’t be restored.

| username: 数据库真NB | Original post link

Give up.

| username: Kongdom | Original post link

Refer to this and give it a try:

| username: Jack-li | Original post link

How can you restore without a backup?

| username: TiDBer_QYr0vohO | Original post link

Without a backup, it cannot be restored. Write a scheduled task to back up the .tiup directory.

| username: songxuecheng | Original post link

Okay. In theory, it can be restored. I’ll write a topo file first and then give it a try.

| username: Kongdom | Original post link

:thinking: I saw an expert say it’s not idempotent, so it feels like there’s a possibility of success.

| username: TiDBer_JUi6UvZm | Original post link

Marking it, waiting to see how to fix it.

| username: TiDBer_JUi6UvZm | Original post link

If it can’t be restored, I feel like we can submit a request to TiDB.

| username: songxuecheng | Original post link

This can indeed be proposed: tiup quickly restores existing cluster management.

| username: Hacker007 | Original post link

The house key is lost.

| username: 像风一样的男子 | Original post link

Someone asked about this before and successfully recovered. You can refer to it:

| username: DBAER | Original post link

Marking this, it is indeed a scenario.

| username: 呢莫不爱吃鱼 | Original post link

On the Importance of Scheduled Backups…

| username: tidb菜鸟一只 | Original post link

Install tiup on the backup node, then configure the information of the original cluster in topology.yaml (you need to enter the information of the original cluster nodes, including IP, port, configuration, and labels, all of which should be the same as the original. You can log in to each machine to check, and it’s best to keep the parameters consistent, otherwise, you may need to modify some parameters later).

Then execute:

tiup cluster deploy tidb-xxx ./topology.yaml
tiup cluster display tidb-xxx

You can see the information of the original nodes.

| username: zhanggame1 | Original post link

Have you tested it?

| username: 随缘天空 | Original post link

Try reinstalling tiup and tiup cluster.

| username: tidb菜鸟一只 | Original post link

I have tested it. You can just find another machine and use the original YAML file from tiup to test it.

| username: zhanggame1 | Original post link

Okay, I’ll try it later.