How to Roll Back TiDB 7.6 to 7.5 LTS Version in a Production Environment, Including Data

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

Original topic: TiDB7.6生产环境如何退到7.5LTS版本,包括里面的数据

| username: 郑旭东石家庄

[TiDB Usage Environment] Production Environment
[TiDB Version] V7.6
[Reproduction Path] Currently on version 7.6, want to roll back to 7.5 LTS version and migrate data
[Encountered Issues: Problem Phenomenon and Impact] Don’t know how to operate, what are the precautions
[Resource Configuration] Enter TiDB Dashboard - Cluster Info - Hosts, screenshot this page
[Attachment: Screenshot/Log/Monitoring]

| username: dba远航 | Original post link

Use DM to synchronize to 7.5

| username: 啦啦啦啦啦 | Original post link

The cluster itself does not support rollback. You can set up a new cluster with version 7.5 on other hardware and then use TICDC to synchronize the data back.

| username: 托马斯滑板鞋 | Original post link

Uh, in a production environment, it’s better to honestly back up the data and rebuild.

| username: 小龙虾爱大龙虾 | Original post link

There is no downgrade method, you can only create a new cluster and migrate.

| username: Jayjlchen | Original post link

Offline migration is done using dumpling+lightning.
Online migration is done using DM or ticdc.

| username: 大飞哥online | Original post link

Rebuild + data recovery

| username: zhanggame1 | Original post link

There are no bugs, so there’s no need to roll back.

| username: Jellybean | Original post link

First of all, TiDB does not support direct rollback of upgraded data versions, but you can achieve version switching through a master-slave solution.

If you want to implement an upgrade rollback plan, you can consider using TiCDC to set up a master-slave cluster. Initially, both the master and slave clusters are on v7.5. Then, upgrade the upstream cluster to v7.6. If any issues arise, you can directly switch to the downstream slave cluster to achieve the rollback.

If you have already upgraded and want to roll back, you need to deploy a new v7.5 cluster first, then set up a master-slave cluster, and switch the business to achieve the downgrade.

| username: 霸王龙的日常 | Original post link

Version rollback is not supported. The safest and most appropriate approach is to create a new database, back it up, and then restore it.

| username: YuchongXU | Original post link

Not supported

| username: redgame | Original post link

There’s no going back.

| username: DBAER | Original post link

You can only migrate. Is there any problem with this version? Do we need to roll back?

| username: TIDB-Learner | Original post link

Cluster reconstruction + data migration

| username: lemonade010 | Original post link

Rebuild + data recovery

| username: WinterLiu | Original post link

:grin: There’s no going back.

| username: TiDBer_小阿飞 | Original post link

| username: Soysauce520 | Original post link

You can’t roll back directly, export and import instead. If possible, use BR, it’s faster.

  1. Use Dumpling to export data, make sure to include views, system variables, and user permissions.
  2. Reinstall the cluster with version 7.5.
  3. Use Lightning to import, increase the concurrency parameters to speed up the migration, as the default parameters don’t fully utilize the CPU.
    Make sure to do this during downtime and ensure you have enough time for the migration.