upgrade
Use TiUP for patch upgrade (HotFix)
-R : all -N : specified nodes
Upgrade all TiDB instances on the cluster:
tiup cluster path <cluster-name> /tmp/tidb-hotfix.tar.gz -R tidb
Replace one of the TiDB instances:
tiup cluster path <cluster-name> /tmp/tidb-hotfix.tar.gz _N ${
Node_IP}:${
Node_Port}
Version upgrade process
升级TiUP=》修改TiUP Cluster拓扑配置文件=》检查当前集群监控状况=》将集群升级到指定版本=》验证
Upgrade Preparation - Updating TiUP
tiup update --self # Upgrade TiUP version
tiup update cluster # Upgrade tiup cluster version
Upgrade Preparation - Edit TiUP Cluster
tiup cluster edit-config <cluster-name>
Upgrade Preparation - Cluster Monitoring Status Check
Check the current region health status of the cluster
tiup cluster check --cluster
Upgrade TiDB cluster
Non-stop upgrade
tiup cluster upgrade
downtime upgrade
停止集群
tiup cluster stop <cluster-name>
离线升级
tiup cluster upgrdate <cluster-name> <version> --offline
启动集群
tiup cluster start <cluster-name>
Verify the TiDB cluster upgrade result
Check the cluster version
tiup cluster display <cluster-name>
Upgrade FAQ
Question 1: The terminal reports an error during the upgrade. How to proceed with the upgrade after processing the error?
1. Check the operation record and find the ID of the failed upgrade operation record
tiup cluster audit
2. Retry the last upgrade operation record
tiup cluster replay <audit-id>
Question 2: The upgrade process takes a long time, if you skip this step to upgrade quickly
tiup cluster upgrade <cluster-name> <version> --force
Question 3: Upgrade and update peripheral tools such as pd-ctl
tiup install ctl:v5.0.0