From 29fcf877a6a3be2ab7832c2ea9ba462042f960d9 Mon Sep 17 00:00:00 2001 From: RidRisR <79858083+RidRisR@users.noreply.github.com> Date: Tue, 31 Dec 2024 09:07:20 +0100 Subject: [PATCH 1/8] update --- br/backup-and-restore-overview.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/br/backup-and-restore-overview.md b/br/backup-and-restore-overview.md index f4b03dddd75c7..a25daf58d4fe5 100644 --- a/br/backup-and-restore-overview.md +++ b/br/backup-and-restore-overview.md @@ -136,6 +136,26 @@ The compatibility information for BR before TiDB v6.6.0 is as follows: | TiDB v6.0, v6.1, v6.2, v6.3, v6.4, or v6.5 snapshot backup | Compatible (known issue [#36379](https://github.com/pingcap/tidb/issues/36379): if backup data contains an empty schema, BR might report an error.) | Compatible | Compatible | Compatible | Compatible (BR must be v6.6) | | TiDB v6.3, v6.4, v6.5, or v6.6 log backup| Incompatible | Incompatible | Incompatible | Compatible | Compatible | +The compatibility information for BR between TiDB versions 6.5.0 and 8.5.0, including all long-term support versions (6.5.0, 7.1.0, 7.5.0, 8.1.0, 8.5.0): + +**Known Issue:** Some system table fields were changed to be case-sensitive in version 7.2.0, which may cause cross-version backup and restore failures. Refer to [#43717](https://github.com/pingcap/tidb/issues/43717). + +| Backup Type | Backup Version | Restore Version | Result | +|-----------------------------------|----------------|-----------------|---------------| +| Full Backup | 6.5.0 | 7.1.0 | Compatible | +| | 6.5.0 | 7.5.0 or above | ❌ Incompatible | +| | 7.1.0 | 7.5.0 or above | ❌ Incompatible | +| | 7.5.0 | 7.5.0 or above | Compatible | +| | 8.1.0 | 8.1.0 or above | Compatible | +| Full Backup (only user data) | All versions | All versions | Compatible | +| Log Backup | 6.5.0 | 7.1.0 | Compatible | +| | 6.5.0 | 7.5.0 or above | ❌ Incompatible | +| | 7.1.0 | 7.5.0 or above | ❌ Incompatible | +| | 7.1.0 | 7.5.0 or above | ❌ Incompatible | +| | 7.5.0 | 7.5.0 or above | Compatible | +| | 8.1.0 | 8.5.0 or above | Compatible | +| Log Backup (only user data) | All versions | All versions | Compatible | + ## See also - [TiDB Snapshot Backup and Restore Guide](/br/br-snapshot-guide.md) From bb7656b76eda1b23a60316eabed7f4352ad2ee9c Mon Sep 17 00:00:00 2001 From: RidRisR <79858083+RidRisR@users.noreply.github.com> Date: Tue, 7 Jan 2025 07:21:58 +0100 Subject: [PATCH 2/8] mod --- br/backup-and-restore-overview.md | 47 ++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 17 deletions(-) diff --git a/br/backup-and-restore-overview.md b/br/backup-and-restore-overview.md index a25daf58d4fe5..91983710aca32 100644 --- a/br/backup-and-restore-overview.md +++ b/br/backup-and-restore-overview.md @@ -138,23 +138,36 @@ The compatibility information for BR before TiDB v6.6.0 is as follows: The compatibility information for BR between TiDB versions 6.5.0 and 8.5.0, including all long-term support versions (6.5.0, 7.1.0, 7.5.0, 8.1.0, 8.5.0): -**Known Issue:** Some system table fields were changed to be case-sensitive in version 7.2.0, which may cause cross-version backup and restore failures. Refer to [#43717](https://github.com/pingcap/tidb/issues/43717). - -| Backup Type | Backup Version | Restore Version | Result | -|-----------------------------------|----------------|-----------------|---------------| -| Full Backup | 6.5.0 | 7.1.0 | Compatible | -| | 6.5.0 | 7.5.0 or above | ❌ Incompatible | -| | 7.1.0 | 7.5.0 or above | ❌ Incompatible | -| | 7.5.0 | 7.5.0 or above | Compatible | -| | 8.1.0 | 8.1.0 or above | Compatible | -| Full Backup (only user data) | All versions | All versions | Compatible | -| Log Backup | 6.5.0 | 7.1.0 | Compatible | -| | 6.5.0 | 7.5.0 or above | ❌ Incompatible | -| | 7.1.0 | 7.5.0 or above | ❌ Incompatible | -| | 7.1.0 | 7.5.0 or above | ❌ Incompatible | -| | 7.5.0 | 7.5.0 or above | Compatible | -| | 8.1.0 | 8.5.0 or above | Compatible | -| Log Backup (only user data) | All versions | All versions | Compatible | +> **Note:** +> +> Known Issue: In version 7.2.0, some system table fields became case-sensitive, which may cause cross-version backup and restore failures. For more details, see [Issue #43717](https://github.com/pingcap/tidb/issues/43717)。 +> +> To maximize the recovery of all system tables (skipping only those with format changes), you can add the following suffix during backup/restore: +> --filter '*.*' --filter "__TiDB_BR_Temporary_*.*" --filter '!mysql.*' --filter 'mysql.bind_info' --filter 'mysql.user' --filter 'mysql.global_priv' --filter 'mysql.global_grants' --filter 'mysql.default_roles' --filter 'mysql.role_edges' --filter '!sys.*' --filter '!INFORMATION_SCHEMA.*' --filter '!PERFORMANCE_SCHEMA.*' --filter '!METRICS_SCHEMA.*' --filter '!INSPECTION_SCHEMA.*' + +The following table lists the compatibility matrix for full backups: + +| Backup Version | Compatible Restore Versions | Incompatible Restore Versions | +|:---------|:----------------|:------------------| +| 6.5.0 | 7.1.0 | 7.5.0 and above | +| 7.1.0 | - | 7.5.0 and above | +| 7.5.0 | 7.5.0 and above | - | +| 8.1.0 | 8.1.0 and above | - | + +The following table lists the compatibility matrix for log backups: + +| Backup Version | Compatible Restore Versions | Incompatible Restore Versions | +|:---------|:----------------|:------------------| +| 6.5.0 | 7.1.0 | 7.5.0 and above | +| 7.1.0 | - | 7.5.0 and above | +| 7.5.0 | 7.5.0 and above | - | +| 8.1.0 | 8.1.0 and above | - | + +> **Note:** +> +> When only user data is backed up (full backup or log backup), all versions are compatible with each other. +> +> “-” means there are no compatibility restrictions for the corresponding scenario. ## See also From b56f7c708b0365d2a62b6b0b6fa8e9a10f611901 Mon Sep 17 00:00:00 2001 From: houfaxin Date: Wed, 8 Jan 2025 14:12:32 +0800 Subject: [PATCH 3/8] Update backup-and-restore-overview.md --- br/backup-and-restore-overview.md | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/br/backup-and-restore-overview.md b/br/backup-and-restore-overview.md index 91983710aca32..6851835bca93e 100644 --- a/br/backup-and-restore-overview.md +++ b/br/backup-and-restore-overview.md @@ -129,6 +129,8 @@ Before performing backup and restore, BR compares the TiDB cluster version with Starting from v7.0.0, TiDB gradually supports performing backup and restore operations through SQL statements. Therefore, it is strongly recommended to use the BR tool of the same major version as the TiDB cluster when backing up and restoring cluster data, and avoid performing data backup and restore operations across major versions. This helps ensure smooth execution of restore operations and data consistency. Starting from v7.6.0, BR restores data in some `mysql` system tables by default, that is, the `--with-sys-table` option is set to `true` by default. When restoring data to a TiDB cluster with a different version, if you encounter an error similar to `[BR:Restore:ErrRestoreIncompatibleSys]incompatible system table` due to different schemas of system tables, you can set `--with-sys-table=false` to skip restoring the system tables and avoid this error. +#### Compatibility matrix for BR versions before TiDB v6.6.0 + The compatibility information for BR before TiDB v6.6.0 is as follows: | Backup version (vertical) \ Restore version (horizontal) | Restore to TiDB v6.0 | Restore to TiDB v6.1 | Restore to TiDB v6.2 | Restore to TiDB v6.3, v6.4, or v6.5 | Restore to TiDB v6.6 | @@ -136,18 +138,17 @@ The compatibility information for BR before TiDB v6.6.0 is as follows: | TiDB v6.0, v6.1, v6.2, v6.3, v6.4, or v6.5 snapshot backup | Compatible (known issue [#36379](https://github.com/pingcap/tidb/issues/36379): if backup data contains an empty schema, BR might report an error.) | Compatible | Compatible | Compatible | Compatible (BR must be v6.6) | | TiDB v6.3, v6.4, v6.5, or v6.6 log backup| Incompatible | Incompatible | Incompatible | Compatible | Compatible | -The compatibility information for BR between TiDB versions 6.5.0 and 8.5.0, including all long-term support versions (6.5.0, 7.1.0, 7.5.0, 8.1.0, 8.5.0): +#### Compatibility matrix for BR versions between TiDB v6.5 and v8.5 + +This section introduces the compatibility information for BR versions between TiDB v6.5 and v8.5, including all long-term support (LTS) versions (v6.5, v7.1, v7.5, v8.1, and v8.5): > **Note:** > -> Known Issue: In version 7.2.0, some system table fields became case-sensitive, which may cause cross-version backup and restore failures. For more details, see [Issue #43717](https://github.com/pingcap/tidb/issues/43717)。 -> -> To maximize the recovery of all system tables (skipping only those with format changes), you can add the following suffix during backup/restore: -> --filter '*.*' --filter "__TiDB_BR_Temporary_*.*" --filter '!mysql.*' --filter 'mysql.bind_info' --filter 'mysql.user' --filter 'mysql.global_priv' --filter 'mysql.global_grants' --filter 'mysql.default_roles' --filter 'mysql.role_edges' --filter '!sys.*' --filter '!INFORMATION_SCHEMA.*' --filter '!PERFORMANCE_SCHEMA.*' --filter '!METRICS_SCHEMA.*' --filter '!INSPECTION_SCHEMA.*' +> Known Issue: In version 7.2.0, some system table fields became case-sensitive, which might cause cross-version backup and restore failures. For more details, see [Issue #43717](https://github.com/pingcap/tidb/issues/43717). The following table lists the compatibility matrix for full backups: -| Backup Version | Compatible Restore Versions | Incompatible Restore Versions | +| Backup version | Compatible restore versions | Incompatible restore versions | |:---------|:----------------|:------------------| | 6.5.0 | 7.1.0 | 7.5.0 and above | | 7.1.0 | - | 7.5.0 and above | @@ -156,7 +157,7 @@ The following table lists the compatibility matrix for full backups: The following table lists the compatibility matrix for log backups: -| Backup Version | Compatible Restore Versions | Incompatible Restore Versions | +| Backup version | Compatible restore versions | Incompatible restore versions | |:---------|:----------------|:------------------| | 6.5.0 | 7.1.0 | 7.5.0 and above | | 7.1.0 | - | 7.5.0 and above | @@ -165,9 +166,9 @@ The following table lists the compatibility matrix for log backups: > **Note:** > -> When only user data is backed up (full backup or log backup), all versions are compatible with each other. -> -> “-” means there are no compatibility restrictions for the corresponding scenario. +> - When only user data is backed up (full backup or log backup), all versions are compatible with each other. +> - To maximize the recovery of all system tables (skipping only those with format changes), you can add the following suffix during backup/restore: `--filter '*.*' --filter "__TiDB_BR_Temporary_*.*" --filter '!mysql.*' --filter 'mysql.bind_info' --filter 'mysql.user' --filter 'mysql.global_priv' --filter 'mysql.global_grants' --filter 'mysql.default_roles' --filter 'mysql.role_edges' --filter '!sys.*' --filter '!INFORMATION_SCHEMA.*' --filter '!PERFORMANCE_SCHEMA.*' --filter '!METRICS_SCHEMA.*' --filter '!INSPECTION_SCHEMA.*'` +> - `-` means that there are no compatibility restrictions for the corresponding scenario. ## See also From 4148e66e2408fa738612ab94005de6a83723ab1f Mon Sep 17 00:00:00 2001 From: ris <79858083+RidRisR@users.noreply.github.com> Date: Wed, 8 Jan 2025 17:02:50 +0800 Subject: [PATCH 4/8] Update br/backup-and-restore-overview.md Co-authored-by: xixirangrang --- br/backup-and-restore-overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/br/backup-and-restore-overview.md b/br/backup-and-restore-overview.md index 6851835bca93e..7a228cf8c8be6 100644 --- a/br/backup-and-restore-overview.md +++ b/br/backup-and-restore-overview.md @@ -167,7 +167,7 @@ The following table lists the compatibility matrix for log backups: > **Note:** > > - When only user data is backed up (full backup or log backup), all versions are compatible with each other. -> - To maximize the recovery of all system tables (skipping only those with format changes), you can add the following suffix during backup/restore: `--filter '*.*' --filter "__TiDB_BR_Temporary_*.*" --filter '!mysql.*' --filter 'mysql.bind_info' --filter 'mysql.user' --filter 'mysql.global_priv' --filter 'mysql.global_grants' --filter 'mysql.default_roles' --filter 'mysql.role_edges' --filter '!sys.*' --filter '!INFORMATION_SCHEMA.*' --filter '!PERFORMANCE_SCHEMA.*' --filter '!METRICS_SCHEMA.*' --filter '!INSPECTION_SCHEMA.*'` +> - In scenarios where recovering the `mysql` system table is incompatible, you can resolve the problem by setting `--with-sys-table=false` to skip recovering all system tables, or use a more fine-grained filter to just skip incompatible system tables, for example: `--filter '*.*' --filter "__TiDB_BR_Temporary_*.*" --filter '!mysql.*' --filter 'mysql.bind_info' --filter 'mysql.user' --filter 'mysql.global_priv' --filter 'mysql.global_grants' --filter 'mysql.default_roles' --filter 'mysql.role_edges' --filter '!sys.*' --filter '!INFORMATION_SCHEMA.*' --filter '!PERFORMANCE_SCHEMA.*' --filter '!METRICS_SCHEMA.*' --filter '!INSPECTION_SCHEMA.*'` > - `-` means that there are no compatibility restrictions for the corresponding scenario. ## See also From 00ecfb4e90ae07cc21e801c2ea1424e5cb262b33 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Thu, 9 Jan 2025 07:59:32 +0800 Subject: [PATCH 5/8] Apply suggestions from code review Co-authored-by: Aolin --- br/backup-and-restore-overview.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/br/backup-and-restore-overview.md b/br/backup-and-restore-overview.md index 7a228cf8c8be6..9f114de59b787 100644 --- a/br/backup-and-restore-overview.md +++ b/br/backup-and-restore-overview.md @@ -129,7 +129,7 @@ Before performing backup and restore, BR compares the TiDB cluster version with Starting from v7.0.0, TiDB gradually supports performing backup and restore operations through SQL statements. Therefore, it is strongly recommended to use the BR tool of the same major version as the TiDB cluster when backing up and restoring cluster data, and avoid performing data backup and restore operations across major versions. This helps ensure smooth execution of restore operations and data consistency. Starting from v7.6.0, BR restores data in some `mysql` system tables by default, that is, the `--with-sys-table` option is set to `true` by default. When restoring data to a TiDB cluster with a different version, if you encounter an error similar to `[BR:Restore:ErrRestoreIncompatibleSys]incompatible system table` due to different schemas of system tables, you can set `--with-sys-table=false` to skip restoring the system tables and avoid this error. -#### Compatibility matrix for BR versions before TiDB v6.6.0 +#### BR version compatibility matrix before TiDB v6.6.0 The compatibility information for BR before TiDB v6.6.0 is as follows: @@ -138,13 +138,13 @@ The compatibility information for BR before TiDB v6.6.0 is as follows: | TiDB v6.0, v6.1, v6.2, v6.3, v6.4, or v6.5 snapshot backup | Compatible (known issue [#36379](https://github.com/pingcap/tidb/issues/36379): if backup data contains an empty schema, BR might report an error.) | Compatible | Compatible | Compatible | Compatible (BR must be v6.6) | | TiDB v6.3, v6.4, v6.5, or v6.6 log backup| Incompatible | Incompatible | Incompatible | Compatible | Compatible | -#### Compatibility matrix for BR versions between TiDB v6.5 and v8.5 +#### BR version compatibility matrix between TiDB v6.5 and v8.5 -This section introduces the compatibility information for BR versions between TiDB v6.5 and v8.5, including all long-term support (LTS) versions (v6.5, v7.1, v7.5, v8.1, and v8.5): +This section introduces the BR compatibility information for all [Long-Term Support (LTS)](/releases/versioning.md#long-term-support-releases) versions between TiDB v6.5 and v8.5 (including v6.5, v7.1, v7.5, v8.1, and v8.5): > **Note:** > -> Known Issue: In version 7.2.0, some system table fields became case-sensitive, which might cause cross-version backup and restore failures. For more details, see [Issue #43717](https://github.com/pingcap/tidb/issues/43717). +> Known issue: in v7.2.0, some system table fields are changed to case-sensitive, which might cause cross-version backup and restore failures. For more details, see [issue #43717](https://github.com/pingcap/tidb/issues/43717). The following table lists the compatibility matrix for full backups: From 322d0ecd1fd672ce57d40600dc903660e9340a8a Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Thu, 9 Jan 2025 10:03:29 +0800 Subject: [PATCH 6/8] Apply suggestions from code review --- br/backup-and-restore-overview.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/br/backup-and-restore-overview.md b/br/backup-and-restore-overview.md index 9f114de59b787..c00e23faaf064 100644 --- a/br/backup-and-restore-overview.md +++ b/br/backup-and-restore-overview.md @@ -150,19 +150,19 @@ The following table lists the compatibility matrix for full backups: | Backup version | Compatible restore versions | Incompatible restore versions | |:---------|:----------------|:------------------| -| 6.5.0 | 7.1.0 | 7.5.0 and above | -| 7.1.0 | - | 7.5.0 and above | -| 7.5.0 | 7.5.0 and above | - | -| 8.1.0 | 8.1.0 and above | - | +| v6.5.0 | 7.1.0 | v7.5.0 and later | +| v7.1.0 | - | v7.5.0 and later | +| v7.5.0 | v7.5.0 and later | - | +| v8.1.0 | v8.1.0 and later | - | The following table lists the compatibility matrix for log backups: | Backup version | Compatible restore versions | Incompatible restore versions | |:---------|:----------------|:------------------| -| 6.5.0 | 7.1.0 | 7.5.0 and above | -| 7.1.0 | - | 7.5.0 and above | -| 7.5.0 | 7.5.0 and above | - | -| 8.1.0 | 8.1.0 and above | - | +| v6.5.0 | v7.1.0 | v7.5.0 and later | +| v7.1.0 | - | v7.5.0 and later | +| v7.5.0 | v7.5.0 and later | - | +| v8.1.0 | v8.1.0 and later | - | > **Note:** > From b7ba04198293c3f0a5661130b248c78d424b3ba9 Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Thu, 9 Jan 2025 10:13:02 +0800 Subject: [PATCH 7/8] Apply suggestions from code review --- br/backup-and-restore-overview.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/br/backup-and-restore-overview.md b/br/backup-and-restore-overview.md index c00e23faaf064..825ccfbd9af56 100644 --- a/br/backup-and-restore-overview.md +++ b/br/backup-and-restore-overview.md @@ -138,9 +138,9 @@ The compatibility information for BR before TiDB v6.6.0 is as follows: | TiDB v6.0, v6.1, v6.2, v6.3, v6.4, or v6.5 snapshot backup | Compatible (known issue [#36379](https://github.com/pingcap/tidb/issues/36379): if backup data contains an empty schema, BR might report an error.) | Compatible | Compatible | Compatible | Compatible (BR must be v6.6) | | TiDB v6.3, v6.4, v6.5, or v6.6 log backup| Incompatible | Incompatible | Incompatible | Compatible | Compatible | -#### BR version compatibility matrix between TiDB v6.5 and v8.5 +#### BR version compatibility matrix between TiDB v6.5.0 and v8.5.0 -This section introduces the BR compatibility information for all [Long-Term Support (LTS)](/releases/versioning.md#long-term-support-releases) versions between TiDB v6.5 and v8.5 (including v6.5, v7.1, v7.5, v8.1, and v8.5): +This section introduces the BR compatibility information for all [Long-Term Support (LTS)](/releases/versioning.md#long-term-support-releases) versions between TiDB v6.5.0 and v8.5.0 (including v6.5.0, v7.1.0, v7.5.0, v8.1.0, and v8.5.0): > **Note:** > From e87a98d936ab7e5f17bfb1961575c9137b2f46ba Mon Sep 17 00:00:00 2001 From: xixirangrang Date: Thu, 9 Jan 2025 10:29:28 +0800 Subject: [PATCH 8/8] Update br/backup-and-restore-overview.md Co-authored-by: Aolin --- br/backup-and-restore-overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/br/backup-and-restore-overview.md b/br/backup-and-restore-overview.md index 825ccfbd9af56..2608d640f1570 100644 --- a/br/backup-and-restore-overview.md +++ b/br/backup-and-restore-overview.md @@ -167,7 +167,7 @@ The following table lists the compatibility matrix for log backups: > **Note:** > > - When only user data is backed up (full backup or log backup), all versions are compatible with each other. -> - In scenarios where recovering the `mysql` system table is incompatible, you can resolve the problem by setting `--with-sys-table=false` to skip recovering all system tables, or use a more fine-grained filter to just skip incompatible system tables, for example: `--filter '*.*' --filter "__TiDB_BR_Temporary_*.*" --filter '!mysql.*' --filter 'mysql.bind_info' --filter 'mysql.user' --filter 'mysql.global_priv' --filter 'mysql.global_grants' --filter 'mysql.default_roles' --filter 'mysql.role_edges' --filter '!sys.*' --filter '!INFORMATION_SCHEMA.*' --filter '!PERFORMANCE_SCHEMA.*' --filter '!METRICS_SCHEMA.*' --filter '!INSPECTION_SCHEMA.*'` +> - In scenarios where restoring the `mysql` system table is incompatible, you can resolve the problem by setting `--with-sys-table=false` to skip restoring all system tables, or use a more fine-grained filter to just skip incompatible system tables, for example: `--filter '*.*' --filter "__TiDB_BR_Temporary_*.*" --filter '!mysql.*' --filter 'mysql.bind_info' --filter 'mysql.user' --filter 'mysql.global_priv' --filter 'mysql.global_grants' --filter 'mysql.default_roles' --filter 'mysql.role_edges' --filter '!sys.*' --filter '!INFORMATION_SCHEMA.*' --filter '!PERFORMANCE_SCHEMA.*' --filter '!METRICS_SCHEMA.*' --filter '!INSPECTION_SCHEMA.*'`. > - `-` means that there are no compatibility restrictions for the corresponding scenario. ## See also