How to Manually Remove an Installed Cluster Without Using TiUP

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

Original topic: 不用tiup怎么手工删除已经装好的集群

| username: zhanggame1

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version] 7.5

[Encountered Problem: Problem Phenomenon and Impact]
Originally, there was a cluster with 3 nodes, one of which was physically damaged. It had tiup and monitoring deployed on it. Without reinstalling the system, what operations are needed to clean up the tidb components installed on the other two machines?

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

The “tidb-data” and “tidb-deploy” folders need to be deleted. The related system services under /etc/systemd/system also need to be deleted.

| username: vcdog | Original post link

You can consider restoring the tiup tool based on the topology file, and then use the Tiup command to clean everything up with one click.

| username: MrSylar | Original post link

  1. systemctl stop ****.service 2) rm -rf deployment directory
| username: porpoiselxj | Original post link

You can reinstall TiUP on a new node, then manually construct a topology file based on your actual deployment situation to restore cluster management.
The topology file should be backed up regularly.
File path: .tiup/storage/cluster/clusters/cluster_name/meta.yaml. Remember to back it up before making any changes, using the command tiup cluster meta backup.

| username: vcdog | Original post link

You can refer to this TUG member’s post and try to restore the tiup tool:
.tiup and other metadata recovery methods

| username: zhanggame1 | Original post link

Deletion is done. Just delete the tidb-data and tidb-deploy folders, then stop the related TiDB services using systemctl stop, and finally remove the related system services under /etc/systemd/system.

| username: 这里介绍不了我 | Original post link

Just delete the relevant files and services.

| username: wangccsy | Original post link

I have never figured out the location where the data files are stored.

| username: zhanggame1 | Original post link

Looking at the configuration file, if the location is not specified, it defaults to /tidb-data and /tidb-deploy.

| username: zhang_2023 | Original post link

Stop the cluster and delete all files.

| username: 哈喽沃德 | Original post link

Kill the process, remove the folder, and manually clean up the environment variables.

| username: Kongdom | Original post link

In fact, the configuration file in tiup cluster edit-config is quite clearly marked, mainly /tidb-data and /tidb-deploy.

Here is a screenshot from the training:

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.