How to Migrate Data from TiDB Database Version 3 to Version 6

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

Original topic: 3版本的TIDB数据库中的数据,怎样迁移到6版本中

| username: TiDBer_zdfhM5qW

[TiDB Usage Environment] Production Environment
[TiDB Version] TiDB version is 3.0.5,



Using the br tool of version 6 cannot directly back up the data of version 3. What issues might arise if I use the ignore parameter?
If I use the br tool of version 3 to back up the data first and then import it into another environment’s version 3 TiDB database, and then upgrade the database to version 6 TiDB, is this solution feasible? If so, could you provide the BR tool for TiDB version 3? I couldn’t find the corresponding BR backup tool in the Tools package.

| username: TiDBer_zdfhM5qW | Original post link

If upgrading the database from version 3 to version 6, can it be done directly across versions? Or does it need to be upgraded to version 4 first, then to version 5, and finally to version 6?

| username: Billmay表妹 | Original post link

Upgrade from version 3 to 4 using tiup. I remember that version 4 can be directly upgraded to version 6, but the version selection is as follows: upgrading from 4.0 to 6.1 and later versions, 6.1.3 is recommended.

For detailed documentation, please see: 使用 TiUP 升级 TiDB | PingCAP 文档中心

Note: Remember to thoroughly test the new version’s features in a test environment first.

| username: TiDBer_zdfhM5qW | Original post link

Could you provide the BR tool and TIUP for the three versions? I see that we only maintain the four versions of TiDB.

| username: TiDBer_zdfhM5qW | Original post link

It was a project from a long time ago, and I don’t have the installation package for version 3 either. Could you please provide it? Sorry for the trouble.

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

I remember that BR was not available in version 3.0, it was introduced in version 3.1.

| username: tidb菜鸟一只 | Original post link

Is the data volume large? If not, I suggest using logical backup and restore…

| username: Edwin | Original post link

In-place upgrade or off-site upgrade.
Off-site upgrade:
If there is a downtime window, you can consider the export-import method.
If there is no downtime window or it is very small, you can consider binlog synchronization. Please note the limitations of binlog synchronization.
In-place upgrade:
First upgrade to v4, then upgrade from v4 to v6. Currently, v6.1.3 is recommended.

| username: TiDBer_zdfhM5qW | Original post link

More than 300GB of data, right?

| username: TiDBer_zdfhM5qW | Original post link

Ah, so… we can only use logical backups?

| username: Running | Original post link

Use BR to export and then import, you can follow the documentation tutorial.

| username: tidb菜鸟一只 | Original post link

Directly export the 300G logical data; it won’t take much time.

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

Yes, after checking the documentation, it seems that version 3.0 indeed does not have BR. Consider using Dumpling for logical import and export.

| username: TiDBer_zdfhM5qW | Original post link

Thank you. I’ll try using Dumpling.

| username: 裤衩儿飞上天 | Original post link

300G is really nothing, you can just use mysqldump directly :crazy_face:

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.