Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: TiDB7.6生产环境如何退到7.5LTS版本,包括里面的数据
[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]
Use DM to synchronize to 7.5
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.
Uh, in a production environment, it’s better to honestly back up the data and rebuild.
There is no downgrade method, you can only create a new cluster and migrate.
Offline migration is done using dumpling+lightning.
Online migration is done using DM or ticdc.
There are no bugs, so there’s no need to roll back.
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.
Version rollback is not supported. The safest and most appropriate approach is to create a new database, back it up, and then restore it.
You can only migrate. Is there any problem with this version? Do we need to roll back?
Cluster reconstruction + data migration
You can’t roll back directly, export and import instead. If possible, use BR, it’s faster.
- Use Dumpling to export data, make sure to include views, system variables, and user permissions.
- Reinstall the cluster with version 7.5.
- 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.