Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

br: update the compatibility information for BR between TiDB versions 6.5.0 and 8.5.0 #19861

Merged
merged 8 commits into from
Jan 9, 2025
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions br/backup-and-restore-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,47 @@ 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
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

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 |
| ---- | ---- | ---- | ---- | ---- | ---- |
| 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
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

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):
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

> **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).
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

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 | - |
hfxsd marked this conversation as resolved.
Show resolved Hide resolved

> **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.*'`
RidRisR marked this conversation as resolved.
Show resolved Hide resolved
> - `-` means that there are no compatibility restrictions for the corresponding scenario.

## See also

- [TiDB Snapshot Backup and Restore Guide](/br/br-snapshot-guide.md)
Expand Down
Loading