From bda8c51c5a25341f6a63231c254c4ffe8a90b68f Mon Sep 17 00:00:00 2001 From: luancheng Date: Thu, 31 Dec 2020 15:21:20 +0800 Subject: [PATCH 01/13] br: add incompatible issue --- br/backup-and-restore-incompatible.md | 31 +++++++++++++++++++++++++++ br/backup-and-restore-tool.md | 3 +++ 2 files changed, 34 insertions(+) create mode 100644 br/backup-and-restore-incompatible.md diff --git a/br/backup-and-restore-incompatible.md b/br/backup-and-restore-incompatible.md new file mode 100644 index 000000000000..57768b8bbb6a --- /dev/null +++ b/br/backup-and-restore-incompatible.md @@ -0,0 +1,31 @@ +--- +title: Backup & Restore 兼容性问题 +summary: BR 兼容性问题梳理。 +aliases: ['/docs-cn/dev/br/backup-and-restore-incompatible/'] +--- + +# BR 兼容性问题整理 + +BR 和 集群 兼容性可以划分成两个方面,一方面是在某些 feature 在开启或关闭情况下,会导致 KV 格式发生变化,因此可能带来不兼容的问题,另一方面是 BR 某些版本和集群接口不兼容,现整理如下: + +不兼容 feature | 相关 issue | 解决方式 +| ---- | ---- | ----- | +Cluster Index | [#565](https://github.com/pingcap/br/issues/565) | 确保备份时 cluster_index 和恢复时一致,否则会导致数据不一致的问题,如 default not found, 数据索引不一致。 +New collation | [#352](https://github.com/pingcap/br/issues/352) | 确保备份时集群 new_collation 和恢复时一致,否则会导致数据索引不一致,checksum 不通过。 +恢复集群开启 CDC 同步 | [#364](https://github.com/pingcap/br/issues/364#issuecomment-646813965) | BR ingest 的 SST 文件, TiKV 还没实现下推到 CDC,因此使用 BR 恢复时候需要关闭 CDC。 + +在上述 feature 确保兼容的**前提**下,BR 和 TiKV/TiDB/PD 还可能因为版本内部协议不一致/接口不一致出现不兼容的问题,因此 BR 内置了版本检查。 +## 版本检查: +BR 内置版本检查会在执行前,对集群版本和自身版本进行对比检查,如果大版本对不上(比如 BR 4.x 用在 TiDB 5.x 上), 那么会提示退出。但是可以通过设置 `--check-requirements=false` 强行跳过版本检查。 +需要注意的是,跳过检查可能会遇到版本不兼容的问题,现整理如下: + +| 备份 \ 恢复| BR nightly / TiDB nightly| BR 5.0 / TiDB 5.0| BR 4.0 / TiDB 4.0 | +| ---- | ---- | ------| ----- | +**BR nightly / TiDB nightly**|✅| ✅ | ✅ | +**BR 5.0 / TiDB 5.0** | ✅ | ✅ | ✅ | +**BR 4.0 / TiDB 4.0** | ✅ | ✅ | ✅(TiKV>=4.0.0-rc.1(BR [#233](https://github.com/pingcap/br/pull/233) and TiKV not include [#7241](https://github.com/tikv/tikv/pull/7241)), BR will panic TiKV) | +**BR nightly or 5.0 / TiDB 4.0** | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | + + + + diff --git a/br/backup-and-restore-tool.md b/br/backup-and-restore-tool.md index c2d3baee2a92..c985f696483f 100644 --- a/br/backup-and-restore-tool.md +++ b/br/backup-and-restore-tool.md @@ -8,6 +8,9 @@ aliases: ['/docs-cn/dev/br/backup-and-restore-tool/','/docs-cn/dev/reference/too [Backup & Restore](https://github.com/pingcap/br)(以下简称 BR)是 TiDB 分布式备份恢复的命令行工具,用于对 TiDB 集群进行数据备份和恢复。相比 [`dumpling`](/backup-and-restore-using-dumpling-lightning.md),BR 更适合大数据量的场景。本文档介绍了 BR 的使用限制、工作原理、命令行描述、备份恢复用例以及最佳实践。 +## 兼容性 +- BR 作为独立于 TiDB 的工具,会由于某些特性出现备份/恢复不兼容的情况,具体请参考 [BR 兼容性问题整理](/br/backup-and-restore-incompatible.md) + ## 使用限制 - BR 只支持 TiDB v3.1 及以上版本。 From 1a4d67634b12fd40d95426759b0253fa451bddd8 Mon Sep 17 00:00:00 2001 From: luancheng Date: Thu, 31 Dec 2020 15:27:59 +0800 Subject: [PATCH 02/13] fix lint --- br/backup-and-restore-incompatible.md | 10 ++++++---- br/backup-and-restore-tool.md | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/br/backup-and-restore-incompatible.md b/br/backup-and-restore-incompatible.md index 57768b8bbb6a..048f5ecee4c5 100644 --- a/br/backup-and-restore-incompatible.md +++ b/br/backup-and-restore-incompatible.md @@ -15,14 +15,16 @@ New collation | [#352](https://github.com/pingcap/br/issues/352) | 确保 恢复集群开启 CDC 同步 | [#364](https://github.com/pingcap/br/issues/364#issuecomment-646813965) | BR ingest 的 SST 文件, TiKV 还没实现下推到 CDC,因此使用 BR 恢复时候需要关闭 CDC。 在上述 feature 确保兼容的**前提**下,BR 和 TiKV/TiDB/PD 还可能因为版本内部协议不一致/接口不一致出现不兼容的问题,因此 BR 内置了版本检查。 -## 版本检查: + +## 版本检查 + BR 内置版本检查会在执行前,对集群版本和自身版本进行对比检查,如果大版本对不上(比如 BR 4.x 用在 TiDB 5.x 上), 那么会提示退出。但是可以通过设置 `--check-requirements=false` 强行跳过版本检查。 需要注意的是,跳过检查可能会遇到版本不兼容的问题,现整理如下: | 备份 \ 恢复| BR nightly / TiDB nightly| BR 5.0 / TiDB 5.0| BR 4.0 / TiDB 4.0 | -| ---- | ---- | ------| ----- | -**BR nightly / TiDB nightly**|✅| ✅ | ✅ | -**BR 5.0 / TiDB 5.0** | ✅ | ✅ | ✅ | +| ---- | ---- | ---- | ---- | +**BR nightly / TiDB nightly** | ✅ | ✅ | ✅ | +**BR 5.0 / TiDB 5.0** | ✅ | ✅ | ✅ **BR 4.0 / TiDB 4.0** | ✅ | ✅ | ✅(TiKV>=4.0.0-rc.1(BR [#233](https://github.com/pingcap/br/pull/233) and TiKV not include [#7241](https://github.com/tikv/tikv/pull/7241)), BR will panic TiKV) | **BR nightly or 5.0 / TiDB 4.0** | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | diff --git a/br/backup-and-restore-tool.md b/br/backup-and-restore-tool.md index c985f696483f..1ca0b04b54b4 100644 --- a/br/backup-and-restore-tool.md +++ b/br/backup-and-restore-tool.md @@ -9,6 +9,7 @@ aliases: ['/docs-cn/dev/br/backup-and-restore-tool/','/docs-cn/dev/reference/too [Backup & Restore](https://github.com/pingcap/br)(以下简称 BR)是 TiDB 分布式备份恢复的命令行工具,用于对 TiDB 集群进行数据备份和恢复。相比 [`dumpling`](/backup-and-restore-using-dumpling-lightning.md),BR 更适合大数据量的场景。本文档介绍了 BR 的使用限制、工作原理、命令行描述、备份恢复用例以及最佳实践。 ## 兼容性 + - BR 作为独立于 TiDB 的工具,会由于某些特性出现备份/恢复不兼容的情况,具体请参考 [BR 兼容性问题整理](/br/backup-and-restore-incompatible.md) ## 使用限制 From 57c1514e78b3088c46f68e2799e8f6241273686f Mon Sep 17 00:00:00 2001 From: luancheng Date: Thu, 31 Dec 2020 15:28:41 +0800 Subject: [PATCH 03/13] fix lint --- br/backup-and-restore-incompatible.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/br/backup-and-restore-incompatible.md b/br/backup-and-restore-incompatible.md index 048f5ecee4c5..96d1e315ff50 100644 --- a/br/backup-and-restore-incompatible.md +++ b/br/backup-and-restore-incompatible.md @@ -27,7 +27,3 @@ BR 内置版本检查会在执行前,对集群版本和自身版本进行对 **BR 5.0 / TiDB 5.0** | ✅ | ✅ | ✅ **BR 4.0 / TiDB 4.0** | ✅ | ✅ | ✅(TiKV>=4.0.0-rc.1(BR [#233](https://github.com/pingcap/br/pull/233) and TiKV not include [#7241](https://github.com/tikv/tikv/pull/7241)), BR will panic TiKV) | **BR nightly or 5.0 / TiDB 4.0** | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | - - - - From b2976b26214bd963ab5afb8545278975b942a718 Mon Sep 17 00:00:00 2001 From: luancheng Date: Tue, 2 Mar 2021 20:09:38 +0800 Subject: [PATCH 04/13] address comment --- br/backup-and-restore-incompatible.md | 1 + br/backup-and-restore-tool.md | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/br/backup-and-restore-incompatible.md b/br/backup-and-restore-incompatible.md index 96d1e315ff50..616ff2631231 100644 --- a/br/backup-and-restore-incompatible.md +++ b/br/backup-and-restore-incompatible.md @@ -27,3 +27,4 @@ BR 内置版本检查会在执行前,对集群版本和自身版本进行对 **BR 5.0 / TiDB 5.0** | ✅ | ✅ | ✅ **BR 4.0 / TiDB 4.0** | ✅ | ✅ | ✅(TiKV>=4.0.0-rc.1(BR [#233](https://github.com/pingcap/br/pull/233) and TiKV not include [#7241](https://github.com/tikv/tikv/pull/7241)), BR will panic TiKV) | **BR nightly or 5.0 / TiDB 4.0** | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | + diff --git a/br/backup-and-restore-tool.md b/br/backup-and-restore-tool.md index ee92f0eae88d..ea58d8c3f7ee 100644 --- a/br/backup-and-restore-tool.md +++ b/br/backup-and-restore-tool.md @@ -67,7 +67,27 @@ SST 文件以 `storeID_regionID_regionEpoch_keyHash_cf` 的格式命名。格式 ## 兼容性 -BR 作为独立于 TiDB 的工具,会由于某些特性出现备份/恢复不兼容的情况,具体请参考 [BR 兼容性问题整理](/br/backup-and-restore-incompatible.md) +BR 和 集群 兼容性可以划分成两个方面,一方面是在某些 feature 在开启或关闭情况下,会导致 KV 格式发生变化,因此可能带来不兼容的问题,另一方面是 BR 某些版本和集群接口不兼容,现整理如下: + +不兼容 feature | 相关 issue | 解决方式 +| ---- | ---- | ----- | +Cluster Index | [#565](https://github.com/pingcap/br/issues/565) | 确保备份时 cluster_index 和恢复时一致,否则会导致数据不一致的问题,如 default not found, 数据索引不一致。 +New collation | [#352](https://github.com/pingcap/br/issues/352) | 确保备份时集群 new_collation 和恢复时一致,否则会导致数据索引不一致,checksum 不通过。 +恢复集群开启 CDC 同步 | [#364](https://github.com/pingcap/br/issues/364#issuecomment-646813965) | BR ingest 的 SST 文件, TiKV 还没实现下推到 CDC,因此使用 BR 恢复时候需要关闭 CDC。 + +在上述 feature 确保兼容的**前提**下,BR 和 TiKV/TiDB/PD 还可能因为版本内部协议不一致/接口不一致出现不兼容的问题,因此 BR 内置了版本检查。 + +### 版本检查 + +BR 内置版本检查会在执行前,对集群版本和自身版本进行对比检查,如果大版本对不上(比如 BR 4.x 用在 TiDB 5.x 上), 那么会提示退出。但是可以通过设置 `--check-requirements=false` 强行跳过版本检查。 +需要注意的是,跳过检查可能会遇到版本不兼容的问题,现整理如下: + +| 备份 \ 恢复| BR nightly / TiDB nightly| BR 5.0 / TiDB 5.0| BR 4.0 / TiDB 4.0 | +| ---- | ---- | ---- | ---- | +**BR nightly / TiDB nightly** | ✅ | ✅ | ✅ | +**BR 5.0 / TiDB 5.0** | ✅ | ✅ | ✅ +**BR 4.0 / TiDB 4.0** | ✅ | ✅ | ✅(TiKV>=4.0.0-rc.1(BR [#233](https://github.com/pingcap/br/pull/233) and TiKV not include [#7241](https://github.com/tikv/tikv/pull/7241)), BR will panic TiKV) | +**BR nightly or 5.0 / TiDB 4.0** | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | ### 运行 BR 的最低机型配置要求 From ff76bfecaefb0ac3f5b5ca3da4589aff2352f4e3 Mon Sep 17 00:00:00 2001 From: luancheng Date: Tue, 2 Mar 2021 20:10:54 +0800 Subject: [PATCH 05/13] address comment --- br/backup-and-restore-incompatible.md | 30 --------------------------- 1 file changed, 30 deletions(-) delete mode 100644 br/backup-and-restore-incompatible.md diff --git a/br/backup-and-restore-incompatible.md b/br/backup-and-restore-incompatible.md deleted file mode 100644 index 616ff2631231..000000000000 --- a/br/backup-and-restore-incompatible.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -title: Backup & Restore 兼容性问题 -summary: BR 兼容性问题梳理。 -aliases: ['/docs-cn/dev/br/backup-and-restore-incompatible/'] ---- - -# BR 兼容性问题整理 - -BR 和 集群 兼容性可以划分成两个方面,一方面是在某些 feature 在开启或关闭情况下,会导致 KV 格式发生变化,因此可能带来不兼容的问题,另一方面是 BR 某些版本和集群接口不兼容,现整理如下: - -不兼容 feature | 相关 issue | 解决方式 -| ---- | ---- | ----- | -Cluster Index | [#565](https://github.com/pingcap/br/issues/565) | 确保备份时 cluster_index 和恢复时一致,否则会导致数据不一致的问题,如 default not found, 数据索引不一致。 -New collation | [#352](https://github.com/pingcap/br/issues/352) | 确保备份时集群 new_collation 和恢复时一致,否则会导致数据索引不一致,checksum 不通过。 -恢复集群开启 CDC 同步 | [#364](https://github.com/pingcap/br/issues/364#issuecomment-646813965) | BR ingest 的 SST 文件, TiKV 还没实现下推到 CDC,因此使用 BR 恢复时候需要关闭 CDC。 - -在上述 feature 确保兼容的**前提**下,BR 和 TiKV/TiDB/PD 还可能因为版本内部协议不一致/接口不一致出现不兼容的问题,因此 BR 内置了版本检查。 - -## 版本检查 - -BR 内置版本检查会在执行前,对集群版本和自身版本进行对比检查,如果大版本对不上(比如 BR 4.x 用在 TiDB 5.x 上), 那么会提示退出。但是可以通过设置 `--check-requirements=false` 强行跳过版本检查。 -需要注意的是,跳过检查可能会遇到版本不兼容的问题,现整理如下: - -| 备份 \ 恢复| BR nightly / TiDB nightly| BR 5.0 / TiDB 5.0| BR 4.0 / TiDB 4.0 | -| ---- | ---- | ---- | ---- | -**BR nightly / TiDB nightly** | ✅ | ✅ | ✅ | -**BR 5.0 / TiDB 5.0** | ✅ | ✅ | ✅ -**BR 4.0 / TiDB 4.0** | ✅ | ✅ | ✅(TiKV>=4.0.0-rc.1(BR [#233](https://github.com/pingcap/br/pull/233) and TiKV not include [#7241](https://github.com/tikv/tikv/pull/7241)), BR will panic TiKV) | -**BR nightly or 5.0 / TiDB 4.0** | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | - From 2b25e1bd2ef2938997c50309da271e0bcc23a549 Mon Sep 17 00:00:00 2001 From: 3pointer Date: Tue, 9 Mar 2021 16:58:04 +0800 Subject: [PATCH 06/13] Update br/backup-and-restore-tool.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- br/backup-and-restore-tool.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/br/backup-and-restore-tool.md b/br/backup-and-restore-tool.md index ea58d8c3f7ee..df4940f5fee2 100644 --- a/br/backup-and-restore-tool.md +++ b/br/backup-and-restore-tool.md @@ -79,7 +79,7 @@ New collation | [#352](https://github.com/pingcap/br/issues/352) | 确保 ### 版本检查 -BR 内置版本检查会在执行前,对集群版本和自身版本进行对比检查,如果大版本对不上(比如 BR 4.x 用在 TiDB 5.x 上), 那么会提示退出。但是可以通过设置 `--check-requirements=false` 强行跳过版本检查。 +BR 内置版本会在执行备份和恢复操作前,对 TiDB 集群版本和自身版本进行对比检查。如果大版本不匹配(比如 BR 4.x 和 TiDB 5.x 上),BR 会提示退出。如要跳过版本检查,可以通过设置 `--check-requirements=false` 强行跳过版本检查,但是可能会遇到版本不兼容的问题。 需要注意的是,跳过检查可能会遇到版本不兼容的问题,现整理如下: | 备份 \ 恢复| BR nightly / TiDB nightly| BR 5.0 / TiDB 5.0| BR 4.0 / TiDB 4.0 | From b44ca7be966cd45634e2ae900fd3d841fe4b37e9 Mon Sep 17 00:00:00 2001 From: 3pointer Date: Tue, 9 Mar 2021 17:06:43 +0800 Subject: [PATCH 07/13] Update br/backup-and-restore-tool.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- br/backup-and-restore-tool.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/br/backup-and-restore-tool.md b/br/backup-and-restore-tool.md index df4940f5fee2..38c9618fe519 100644 --- a/br/backup-and-restore-tool.md +++ b/br/backup-and-restore-tool.md @@ -67,7 +67,10 @@ SST 文件以 `storeID_regionID_regionEpoch_keyHash_cf` 的格式命名。格式 ## 兼容性 -BR 和 集群 兼容性可以划分成两个方面,一方面是在某些 feature 在开启或关闭情况下,会导致 KV 格式发生变化,因此可能带来不兼容的问题,另一方面是 BR 某些版本和集群接口不兼容,现整理如下: +BR 和 TiDB 集群的兼容性问题分为以下两方面: + ++ 某些功能在开启或关闭状态下,会导致 KV 格式发生变化,因此可能带来不兼容的问题 ++ BR 部分版本和 TiDB 集群的接口不兼容 不兼容 feature | 相关 issue | 解决方式 | ---- | ---- | ----- | From 2bc1ab245c375f4bc878ad4a29075ea1b7b5f0df Mon Sep 17 00:00:00 2001 From: luancheng Date: Tue, 9 Mar 2021 17:16:55 +0800 Subject: [PATCH 08/13] address comments --- br/backup-and-restore-tool.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/br/backup-and-restore-tool.md b/br/backup-and-restore-tool.md index 38c9618fe519..b8af71be3717 100644 --- a/br/backup-and-restore-tool.md +++ b/br/backup-and-restore-tool.md @@ -69,28 +69,30 @@ SST 文件以 `storeID_regionID_regionEpoch_keyHash_cf` 的格式命名。格式 BR 和 TiDB 集群的兼容性问题分为以下两方面: -+ 某些功能在开启或关闭状态下,会导致 KV 格式发生变化,因此可能带来不兼容的问题 ++ 某些功能在开启或关闭状态下,会导致 KV 格式发生变化,因此备份和恢复期间没有统一开启或关闭,就会带来不兼容的问题 + BR 部分版本和 TiDB 集群的接口不兼容 -不兼容 feature | 相关 issue | 解决方式 +下表整理了会导致 KV 格式发生变化的功能。 + +功能 | 相关 issue | 解决方式 | ---- | ---- | ----- | -Cluster Index | [#565](https://github.com/pingcap/br/issues/565) | 确保备份时 cluster_index 和恢复时一致,否则会导致数据不一致的问题,如 default not found, 数据索引不一致。 -New collation | [#352](https://github.com/pingcap/br/issues/352) | 确保备份时集群 new_collation 和恢复时一致,否则会导致数据索引不一致,checksum 不通过。 -恢复集群开启 CDC 同步 | [#364](https://github.com/pingcap/br/issues/364#issuecomment-646813965) | BR ingest 的 SST 文件, TiKV 还没实现下推到 CDC,因此使用 BR 恢复时候需要关闭 CDC。 +聚簇索引 | [#565](https://github.com/pingcap/br/issues/565) | 确保备份时 tidb_enable_clustered_index 变量和恢复时一致,否则会导致数据不一致的问题,如 default not found, 数据索引不一致。 +New collation | [#352](https://github.com/pingcap/br/issues/352) | 确保备份时集群 new_collations_enabled_on_first_bootstrap 和恢复时一致,否则会导致数据索引不一致,checksum 不通过。 +恢复集群开启 CDC 同步 | [#364](https://github.com/pingcap/br/issues/364#issuecomment-646813965) | BR ingest 的 SST 文件, TiKV 还没实现下推到 TiCDC,因此使用 BR 恢复时候需要关闭 TiCDC。 -在上述 feature 确保兼容的**前提**下,BR 和 TiKV/TiDB/PD 还可能因为版本内部协议不一致/接口不一致出现不兼容的问题,因此 BR 内置了版本检查。 +在上述功能确保备份恢复一致的**前提**下,BR 和 TiKV/TiDB/PD 还可能因为版本内部协议不一致/接口不一致出现不兼容的问题,因此 BR 内置了版本检查。 ### 版本检查 BR 内置版本会在执行备份和恢复操作前,对 TiDB 集群版本和自身版本进行对比检查。如果大版本不匹配(比如 BR 4.x 和 TiDB 5.x 上),BR 会提示退出。如要跳过版本检查,可以通过设置 `--check-requirements=false` 强行跳过版本检查,但是可能会遇到版本不兼容的问题。 需要注意的是,跳过检查可能会遇到版本不兼容的问题,现整理如下: -| 备份 \ 恢复| BR nightly / TiDB nightly| BR 5.0 / TiDB 5.0| BR 4.0 / TiDB 4.0 | +| 备份版本 \ 恢复版本| BR nightly / TiDB nightly| BR 5.0 / TiDB 5.0| BR 4.0 / TiDB 4.0 | | ---- | ---- | ---- | ---- | **BR nightly / TiDB nightly** | ✅ | ✅ | ✅ | **BR 5.0 / TiDB 5.0** | ✅ | ✅ | ✅ -**BR 4.0 / TiDB 4.0** | ✅ | ✅ | ✅(TiKV>=4.0.0-rc.1(BR [#233](https://github.com/pingcap/br/pull/233) and TiKV not include [#7241](https://github.com/tikv/tikv/pull/7241)), BR will panic TiKV) | -**BR nightly or 5.0 / TiDB 4.0** | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | ❌(TiDB < 4.0.9 after [#609](https://github.com/pingcap/br/issues/609)) | +**BR 4.0 / TiDB 4.0** | ✅ | ✅ | ✅(TiKV>=4.0.0-rc.1(BR 包含 [#233](https://github.com/pingcap/br/pull/233),但 TiKV 不包含 [#7241](https://github.com/tikv/tikv/pull/7241)), 那么 BR 会导致 TiKV 节点重启) | +**BR nightly or 5.0 / TiDB 4.0** | ❌(TiDB < 4.0.9 会出现 [#609](https://github.com/pingcap/br/issues/609) 问题) | ❌(TiDB < 4.0.9 会出现 [#609](https://github.com/pingcap/br/issues/609) 问题) | ❌(TiDB < 4.0.9 会出现 [#609](https://github.com/pingcap/br/issues/609) 问题) | ### 运行 BR 的最低机型配置要求 From 8295b72dac67fdaf0945e3b1620127463b4bf00e Mon Sep 17 00:00:00 2001 From: 3pointer Date: Tue, 23 Mar 2021 15:49:57 +0800 Subject: [PATCH 09/13] Update br/backup-and-restore-tool.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- br/backup-and-restore-tool.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/br/backup-and-restore-tool.md b/br/backup-and-restore-tool.md index b8af71be3717..817f7d469d74 100644 --- a/br/backup-and-restore-tool.md +++ b/br/backup-and-restore-tool.md @@ -78,7 +78,7 @@ BR 和 TiDB 集群的兼容性问题分为以下两方面: | ---- | ---- | ----- | 聚簇索引 | [#565](https://github.com/pingcap/br/issues/565) | 确保备份时 tidb_enable_clustered_index 变量和恢复时一致,否则会导致数据不一致的问题,如 default not found, 数据索引不一致。 New collation | [#352](https://github.com/pingcap/br/issues/352) | 确保备份时集群 new_collations_enabled_on_first_bootstrap 和恢复时一致,否则会导致数据索引不一致,checksum 不通过。 -恢复集群开启 CDC 同步 | [#364](https://github.com/pingcap/br/issues/364#issuecomment-646813965) | BR ingest 的 SST 文件, TiKV 还没实现下推到 TiCDC,因此使用 BR 恢复时候需要关闭 TiCDC。 +恢复集群开启 TiCDC 同步 | [#364](https://github.com/pingcap/br/issues/364#issuecomment-646813965) | TiKV 暂不能将 BR ingest 的 SST 文件下推到 TiCDC,因此使用 BR 恢复时候需要关闭 TiCDC。 在上述功能确保备份恢复一致的**前提**下,BR 和 TiKV/TiDB/PD 还可能因为版本内部协议不一致/接口不一致出现不兼容的问题,因此 BR 内置了版本检查。 From 347e1339e739b80fe8c870e6ec4483aa7b6db05e Mon Sep 17 00:00:00 2001 From: 3pointer Date: Tue, 23 Mar 2021 15:50:14 +0800 Subject: [PATCH 10/13] Update br/backup-and-restore-tool.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- br/backup-and-restore-tool.md | 1 + 1 file changed, 1 insertion(+) diff --git a/br/backup-and-restore-tool.md b/br/backup-and-restore-tool.md index 817f7d469d74..161e2827c8c9 100644 --- a/br/backup-and-restore-tool.md +++ b/br/backup-and-restore-tool.md @@ -85,6 +85,7 @@ New collation | [#352](https://github.com/pingcap/br/issues/352) | 确保 ### 版本检查 BR 内置版本会在执行备份和恢复操作前,对 TiDB 集群版本和自身版本进行对比检查。如果大版本不匹配(比如 BR 4.x 和 TiDB 5.x 上),BR 会提示退出。如要跳过版本检查,可以通过设置 `--check-requirements=false` 强行跳过版本检查,但是可能会遇到版本不兼容的问题。 + 需要注意的是,跳过检查可能会遇到版本不兼容的问题,现整理如下: | 备份版本 \ 恢复版本| BR nightly / TiDB nightly| BR 5.0 / TiDB 5.0| BR 4.0 / TiDB 4.0 | From 02af74b0fc8a5f56e6739035d31333963f41e344 Mon Sep 17 00:00:00 2001 From: 3pointer Date: Tue, 23 Mar 2021 15:51:46 +0800 Subject: [PATCH 11/13] Update br/backup-and-restore-tool.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- br/backup-and-restore-tool.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/br/backup-and-restore-tool.md b/br/backup-and-restore-tool.md index 161e2827c8c9..33efedcc8c43 100644 --- a/br/backup-and-restore-tool.md +++ b/br/backup-and-restore-tool.md @@ -77,7 +77,7 @@ BR 和 TiDB 集群的兼容性问题分为以下两方面: 功能 | 相关 issue | 解决方式 | ---- | ---- | ----- | 聚簇索引 | [#565](https://github.com/pingcap/br/issues/565) | 确保备份时 tidb_enable_clustered_index 变量和恢复时一致,否则会导致数据不一致的问题,如 default not found, 数据索引不一致。 -New collation | [#352](https://github.com/pingcap/br/issues/352) | 确保备份时集群 new_collations_enabled_on_first_bootstrap 和恢复时一致,否则会导致数据索引不一致,checksum 不通过。 +New collation | [#352](https://github.com/pingcap/br/issues/352) | 确保恢复时集群的 new_collations_enabled_on_first_bootstrap 和备份时的一致,否则会导致数据索引不一致和checksum 不通过。 恢复集群开启 TiCDC 同步 | [#364](https://github.com/pingcap/br/issues/364#issuecomment-646813965) | TiKV 暂不能将 BR ingest 的 SST 文件下推到 TiCDC,因此使用 BR 恢复时候需要关闭 TiCDC。 在上述功能确保备份恢复一致的**前提**下,BR 和 TiKV/TiDB/PD 还可能因为版本内部协议不一致/接口不一致出现不兼容的问题,因此 BR 内置了版本检查。 From 62eba435ba3864819720f636cc003adce9728edb Mon Sep 17 00:00:00 2001 From: 3pointer Date: Tue, 23 Mar 2021 16:08:48 +0800 Subject: [PATCH 12/13] Apply suggestions from code review Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- br/backup-and-restore-tool.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/br/backup-and-restore-tool.md b/br/backup-and-restore-tool.md index 33efedcc8c43..94615c6ef356 100644 --- a/br/backup-and-restore-tool.md +++ b/br/backup-and-restore-tool.md @@ -74,11 +74,11 @@ BR 和 TiDB 集群的兼容性问题分为以下两方面: 下表整理了会导致 KV 格式发生变化的功能。 -功能 | 相关 issue | 解决方式 +| 功能 | 相关 issue | 解决方式 | | ---- | ---- | ----- | -聚簇索引 | [#565](https://github.com/pingcap/br/issues/565) | 确保备份时 tidb_enable_clustered_index 变量和恢复时一致,否则会导致数据不一致的问题,如 default not found, 数据索引不一致。 -New collation | [#352](https://github.com/pingcap/br/issues/352) | 确保恢复时集群的 new_collations_enabled_on_first_bootstrap 和备份时的一致,否则会导致数据索引不一致和checksum 不通过。 -恢复集群开启 TiCDC 同步 | [#364](https://github.com/pingcap/br/issues/364#issuecomment-646813965) | TiKV 暂不能将 BR ingest 的 SST 文件下推到 TiCDC,因此使用 BR 恢复时候需要关闭 TiCDC。 +| 聚簇索引 | [#565](https://github.com/pingcap/br/issues/565) | 确保备份时 tidb_enable_clustered_index 变量和恢复时一致,否则会导致数据不一致的问题,例如 `default not found` 和数据索引不一致。 | +| New collation | [#352](https://github.com/pingcap/br/issues/352) | 确保恢复时集群的 new_collations_enabled_on_first_bootstrap 和备份时的一致,否则会导致数据索引不一致和 checksum 通不过。 | +| 恢复集群开启 TiCDC 同步 | [#364](https://github.com/pingcap/br/issues/364#issuecomment-646813965) | TiKV 暂不能将 BR ingest 的 SST 文件下推到 TiCDC,因此使用 BR 恢复时候需要关闭 TiCDC。 | 在上述功能确保备份恢复一致的**前提**下,BR 和 TiKV/TiDB/PD 还可能因为版本内部协议不一致/接口不一致出现不兼容的问题,因此 BR 内置了版本检查。 @@ -88,12 +88,12 @@ BR 内置版本会在执行备份和恢复操作前,对 TiDB 集群版本和 需要注意的是,跳过检查可能会遇到版本不兼容的问题,现整理如下: -| 备份版本 \ 恢复版本| BR nightly / TiDB nightly| BR 5.0 / TiDB 5.0| BR 4.0 / TiDB 4.0 | +| 备份版本(纵向) \ 恢复版本(横向) | BR nightly / TiDB nightly| BR 5.0 / TiDB 5.0| BR 4.0 / TiDB 4.0 | | ---- | ---- | ---- | ---- | -**BR nightly / TiDB nightly** | ✅ | ✅ | ✅ | -**BR 5.0 / TiDB 5.0** | ✅ | ✅ | ✅ -**BR 4.0 / TiDB 4.0** | ✅ | ✅ | ✅(TiKV>=4.0.0-rc.1(BR 包含 [#233](https://github.com/pingcap/br/pull/233),但 TiKV 不包含 [#7241](https://github.com/tikv/tikv/pull/7241)), 那么 BR 会导致 TiKV 节点重启) | -**BR nightly or 5.0 / TiDB 4.0** | ❌(TiDB < 4.0.9 会出现 [#609](https://github.com/pingcap/br/issues/609) 问题) | ❌(TiDB < 4.0.9 会出现 [#609](https://github.com/pingcap/br/issues/609) 问题) | ❌(TiDB < 4.0.9 会出现 [#609](https://github.com/pingcap/br/issues/609) 问题) | +| **BR nightly / TiDB nightly** | ✅ | ✅ | ✅ | +| **BR 5.0 / TiDB 5.0** | ✅ | ✅ | ✅ +| **BR 4.0 / TiDB 4.0** | ✅ | ✅ | ✅(如果 TiKV>=4.0.0-rc.1,BR 包含 [#233](https://github.com/pingcap/br/pull/233) Bug 修复,且 TiKV 不包含 [#7241](https://github.com/tikv/tikv/pull/7241) Bug 修复,那么 BR 会导致 TiKV 节点重启) | +| **BR nightly 或 5.0 / TiDB 4.0** | ❌(当 TiDB < v4.0.9 时会出现 [#609](https://github.com/pingcap/br/issues/609) 问题) | ❌(当 TiDB < 4.0.9 会出现 [#609](https://github.com/pingcap/br/issues/609) 问题) | ❌(当 TiDB < 4.0.9 会出现 [#609](https://github.com/pingcap/br/issues/609) 问题) | ### 运行 BR 的最低机型配置要求 From 169f3e3450b13e6c65783449f6bd55abc2db4d45 Mon Sep 17 00:00:00 2001 From: luancheng Date: Tue, 23 Mar 2021 16:13:00 +0800 Subject: [PATCH 13/13] address comment --- br/backup-and-restore-tool.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/br/backup-and-restore-tool.md b/br/backup-and-restore-tool.md index 94615c6ef356..1e42795f346f 100644 --- a/br/backup-and-restore-tool.md +++ b/br/backup-and-restore-tool.md @@ -84,16 +84,16 @@ BR 和 TiDB 集群的兼容性问题分为以下两方面: ### 版本检查 -BR 内置版本会在执行备份和恢复操作前,对 TiDB 集群版本和自身版本进行对比检查。如果大版本不匹配(比如 BR 4.x 和 TiDB 5.x 上),BR 会提示退出。如要跳过版本检查,可以通过设置 `--check-requirements=false` 强行跳过版本检查,但是可能会遇到版本不兼容的问题。 +BR 内置版本会在执行备份和恢复操作前,对 TiDB 集群版本和自身版本进行对比检查。如果大版本不匹配(比如 BR v4.x 和 TiDB v5.x 上),BR 会提示退出。如要跳过版本检查,可以通过设置 `--check-requirements=false` 强行跳过版本检查,但是可能会遇到版本不兼容的问题。 需要注意的是,跳过检查可能会遇到版本不兼容的问题,现整理如下: -| 备份版本(纵向) \ 恢复版本(横向) | BR nightly / TiDB nightly| BR 5.0 / TiDB 5.0| BR 4.0 / TiDB 4.0 | +| 备份版本(纵向) \ 恢复版本(横向) | BR nightly / TiDB nightly | BR v5.0 / TiDB v5.0| BR v4.0 / TiDB v4.0 | | ---- | ---- | ---- | ---- | | **BR nightly / TiDB nightly** | ✅ | ✅ | ✅ | -| **BR 5.0 / TiDB 5.0** | ✅ | ✅ | ✅ -| **BR 4.0 / TiDB 4.0** | ✅ | ✅ | ✅(如果 TiKV>=4.0.0-rc.1,BR 包含 [#233](https://github.com/pingcap/br/pull/233) Bug 修复,且 TiKV 不包含 [#7241](https://github.com/tikv/tikv/pull/7241) Bug 修复,那么 BR 会导致 TiKV 节点重启) | -| **BR nightly 或 5.0 / TiDB 4.0** | ❌(当 TiDB < v4.0.9 时会出现 [#609](https://github.com/pingcap/br/issues/609) 问题) | ❌(当 TiDB < 4.0.9 会出现 [#609](https://github.com/pingcap/br/issues/609) 问题) | ❌(当 TiDB < 4.0.9 会出现 [#609](https://github.com/pingcap/br/issues/609) 问题) | +| **BR v5.0 / TiDB v5.0** | ✅ | ✅ | ✅ +| **BR v4.0 / TiDB v4.0** | ✅ | ✅ | ✅(如果 TiKV >= v4.0.0-rc.1,BR 包含 [#233](https://github.com/pingcap/br/pull/233) Bug 修复,且 TiKV 不包含 [#7241](https://github.com/tikv/tikv/pull/7241) Bug 修复,那么 BR 会导致 TiKV 节点重启) | +| **BR nightly 或 v5.0 / TiDB v4.0** | ❌(当 TiDB < v4.0.9 时会出现 [#609](https://github.com/pingcap/br/issues/609) 问题) | ❌(当 TiDB < v4.0.9 会出现 [#609](https://github.com/pingcap/br/issues/609) 问题) | ❌(当 TiDB < v4.0.9 会出现 [#609](https://github.com/pingcap/br/issues/609) 问题) | ### 运行 BR 的最低机型配置要求