Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: tiup切换服务器
[TiDB Usage Environment] Production Environment
There is an issue with the server where tiup is installed, and now this server needs to be shut down. Will shutting down tiup affect TiDB? Is there a way to transfer tiup to another server?
Sure, you can install tiup on the new control machine, then directly copy the files from the .tiup directory of the old control machine to the new one. This will not affect the normal operation of the TiDB cluster, but you need to ensure that there are no other components of the TiDB cluster deployed on your control machine.
Just copy the directory directly.
So if there are other components in the TiDB cluster, what issues might arise, or is it just a matter of scaling and switching component nodes?
Copy the .tiup directory to the new server, establish passwordless SSH between the new server and each component, and it can be used.
Other components scale in and out to decommission node services.
If there are other components, you need to first scale out on other machines, and then scale in the nodes on the old control machine.
You can cut directly. Once tiup is installed, you can copy the original over, or use the built-in backup and restore feature.
Passwordless SSH login is a key point.
Snapshot directly applied… Haha!
After tiup is stopped, it does not affect the TiDB cluster. Tiup is just a management tool.
This is the official documentation recommendation
(使用 TiUP 部署运维 TiDB 线上集群 | PingCAP 文档中心)
So how should some monitoring components be migrated? Should it be done according to the scaling operations of nodes, or are other operations required?
Detection components? Can you first clarify which components are on this server? Or use display to check if there are any components of the cluster on this server.
These components are monitoring_servers, grafana_servers, and alertmanager_servers.
This requires scaling in and out for migration.
You can refer to the official recommendation documentation.
Just COPY it to the new control machine, the module won’t be affected.