Can TiDB be downgraded?

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

Original topic: TiDB可以降级吗

| username: TiDBer_HErMeXDz

Upgrading TiDB is very convenient. Can it be downgraded?

| username: TiDBer_小小 | Original post link

Databases are generally stateful services, so downgrading and rollback are usually quite difficult, right?

| username: DBAER | Original post link

Not supported
Upgrade TiDB Using TiUP | PingCAP Documentation Center

| username: xiaoqiao | Original post link

You can set up a lower version cluster and use CDC for primary-backup. If there are any issues, you can switch directly to the lower version cluster.

| username: changpeng75 | Original post link

It is generally not recommended to downgrade, as new features in the new version may have unpredictable consequences after downgrading. If you really need to downgrade, you can use TiCDC. For TiCDC compatibility, you can refer to the documentation at TiCDC 兼容性 | PingCAP 文档中心

| username: Jellybean | Original post link

After upgrading TiDB, major versions do not support downgrading. It is recommended to indirectly achieve this by setting up a master-slave cluster and switching the business.

Minor versions are said to be possible, but it is recommended that the original poster fully verify in a test environment before performing production operations.

| username: DBRE | Original post link

tiup is not supported.

| username: 随缘天空 | Original post link

It is not supported. Once upgraded, you cannot downgrade the version.

| username: vcdog | Original post link

It is possible to use CDC to connect a lower version of TiDB downstream.

| username: TIDB-Learner | Original post link

It is not supported. Do any databases support downgrading now? Generally, they support backward compatibility, meaning that the new version has more new features and is compatible with the previous ones. New features in higher versions are not supported in lower versions, so downgrade operations naturally fail or encounter problems.

| username: Hacker_QGgM2nks | Original post link

It is not supported. Why would there be a downgrade scenario?

| username: 江湖故人 | Original post link

Some cloud platforms support this. After upgrading, you can try it out for a while before “submitting” the upgrade. You can roll back and downgrade before “submitting”.

| username: zhanggame1 | Original post link

Not supported, unless you upgrade with a downtime upgrade and have backed up all files, including data issues.

| username: TiDBer_HErMeXDz | Original post link

Okay. Thank you, experts.

| username: srstack | Original post link

TiDB does not support downgrading by default because the data formats between different versions may differ. We need to check the specific versions in question. If the need for downgrading is particularly strong, it is more recommended to create a cluster with the old version and synchronize the data over to complete the downgrade.

| username: TIDB-Learner | Original post link

This so-called cloud platform is just a snapshot mechanism, right?

| username: Aaronz | Original post link

I’m afraid this can only be accomplished by restoring the data to a lower version cluster.

| username: TiDBer_rvITcue9 | Original post link

Downgrade = Backup, Rebuild, Restore

| username: zhang_2023 | Original post link

Cannot downgrade.

| username: Daniel-W | Original post link

Make sure to back up before upgrading, as downgrading is not supported when using TiUP for the cluster.