What is the most labor-saving and stable upgrade method from 2.0 to 6.0?

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

Original topic: 从 2.0 到 6.0 最省人力最稳的升级方式是什么?

| username: Billmay表妹

Are there any good methods for upgrading TiDB 2.0 to TiDB 6.0? Besides the upgrade path of 2.0 → 3.0 → 4.0 → 5.0 → 6.0

Requirements:

  1. Stability
  2. Saving manpower or time costs
| username: ddhe9527 | Original post link

The most stable and labor-saving method, I think, is to set up a 6.0 cluster and use the TiCDC synchronization tool to synchronize the data from 2.0. When switching over, pause the business to compare the data, and if there are any issues, you can roll back.

| username: 数据小黑 | Original post link

I agree more with the solution of synchronizing with a new cluster and then switching over, but for some resource-constrained colleagues, what is the best solution for an in-place upgrade?
Is it as the documentation says, 2.0-3.0-4.0-6.1? Or 2.0-3.0-4.0-5.0-6.0?

| username: Mark | Original post link

+1 Data synchronization, switching clusters, higher efficiency

| username: ShawnYan | Original post link

Upgrading from 2.0 to 6.0 indicates that the original cluster has been running for several years, and the hardware resources might also need an update. From this perspective:
Applying for new resources, setting up a new cluster, synchronizing data, and switching over at an appropriate time is the most reliable approach.

| username: ti-tiger | Original post link

Building a new one directly is indeed the fastest, least labor-intensive, and most appropriate approach.

| username: Kongdom | Original post link

It is necessary to set up a new cluster, as each major version upgrade has many considerations, especially involving the switch from the management tool Ansible to TiUP.

| username: forever | Original post link

Considering comprehensively, in-place upgrades have a significant impact and complex procedures. We need to consider rollback in case of unsuccessful upgrades, downtime, etc. Setting up a new cluster with real-time synchronization means the downtime is just the switchover time. The original cluster can still serve as a backup. If the new version doesn’t work well, we can switch back to the original cluster as a backup plan.

| username: cs58_dba | Original post link

Generally, version upgrades need to go through various testing environments such as SIT, BBIT, and UAT to ensure everything is foolproof.

| username: TiDBer_jYQINSnf | Original post link

You can’t upgrade directly on the spot; you must set up a test environment and run all the business SQL queries. Otherwise, changes in the execution plan might cause some issues.

| username: cs58_dba | Original post link

Yes, smoke testing, regression testing, performance stress testing, a bunch of processes.

| username: 履霜知冰 | Original post link

Upgrading from version 2 to 6 spans multiple versions, and you need to upgrade one version at a time, i.e., 2.0-3.0-4.0-5.0-6.0. However, multiple upgrades can indeed be quite troublesome.

To save effort, you might consider directly setting up a version 6 cluster and then migrating the business data from version 2 to the version 6 cluster. This would indeed save a lot of effort, but whether it is the most stable approach is uncertain.

| username: buddyyuan | Original post link

  1. Set up version 6.
  2. Then migrate the full data using binlog, and disconnect the binlog after the migration is complete.
  3. Perform functional and performance testing on the application.
  4. If there are no issues, clear the data on the version 6 cluster, agree on a time to sync again, and then switch the application completely to version 6.0.
| username: cs58_dba | Original post link

Indeed, I’m just worried about SQL incompatibility.

| username: Hacker007 | Original post link

The best way is to set up a new cluster, run a bunch of tests, and then switch over after passing the tests.

| username: Billmay表妹 | Original post link

This topic will be automatically closed 60 days after the last reply. No new replies are allowed.