-
Notifications
You must be signed in to change notification settings - Fork 1.2k
br: pitr filter feature release doc #20450
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Wenqi Mou <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@Tristan1900: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the BR documentation by introducing a new section on using filters during PITR operations, as well as adding a new section on concurrent recovery operations.
- Introduces step-by-step instructions and examples for using filters to restore specific databases or tables.
- Adds documentation on how to perform concurrent PITR operations with sample commands and important notes regarding usage limitations.
Comments suppressed due to low confidence (1)
br/br-pitr-manual.md:573
- [nitpick] Including an example or additional details to clarify what constitutes overlapping data sets could help users avoid potential misuse of concurrent PITR operations.
> - 每个并发恢复操作必须针对不同的数据库或非重叠的表集合。尝试并发恢复重叠数据集将导致错误。
### 进行中的日志备份与快照恢复的兼容性 | ||
|
||
从 v9.0.0 开始,当存在日志备份任务时,如果**同时满足**以下条件,则可以正常进行快照恢复 (`br restore [full|database|table]`),并且恢复的数据可以被进行中的日志备份(下称“日志备份”)正常记录: | ||
从 v9.0.0 开始,当存在日志备份任务时,如果**同时满足**以下条件,则可以正常进行快照恢复 (`br restore [full|database|table]`),并且恢复的数据可以被进行中的日志备份(下称"日志备份")正常记录: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider aligning the style of quotation marks used for '日志备份' consistently throughout the document to enhance clarity.
Copilot uses AI. Check for mistakes.
@@ -496,9 +496,85 @@ tiup br restore point --pd="${PD_IP}:2379" | |||
--master-key "local:///path/to/master.key" | |||
``` | |||
|
|||
### 使用过滤器恢复 | |||
|
|||
从 TiDB v9.0.0 开始,你可以在 PITR 过程中使用过滤器来选择性地恢复特定的数据库或表。这使得在时间点恢复操作中能够更精细地控制要恢复的数据。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
从 TiDB v9.0.0 开始,你可以在 PITR 过程中使用过滤器来选择性地恢复特定的数据库或表。这使得在时间点恢复操作中能够更精细地控制要恢复的数据。 | |
从 TiDB v9.0.0 开始,在按时间点恢复 (PITR) 过程中,你可以使用过滤器来选择性地恢复特定的数据库或表,从而更精细地控制要恢复的数据。 |
|
||
从 TiDB v9.0.0 开始,你可以在 PITR 过程中使用过滤器来选择性地恢复特定的数据库或表。这使得在时间点恢复操作中能够更精细地控制要恢复的数据。 | ||
|
||
过滤器模式遵循与其他 BR 操作中使用的[表库过滤](/table-filter.md)相同的语法: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
过滤器模式遵循与其他 BR 操作中使用的[表库过滤](/table-filter.md)相同的语法: | |
过滤器采用与其他 BR 操作相同的[表库过滤语法](/table-filter.md): |
- `'*.*'` - 匹配所有数据库和表 | ||
- `'db1.*'` - 匹配数据库 `db1` 中的所有表 | ||
- `'db1.table1'` - 匹配数据库 `db1` 中的特定表 `table1` | ||
- `'db*.tbl*'` - 匹配以 `db` 开头的数据库和以 `tbl` 开头的表 | ||
- `'!mysql.*'` - 排除 `mysql` 数据库中的所有表 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `'*.*'` - 匹配所有数据库和表 | |
- `'db1.*'` - 匹配数据库 `db1` 中的所有表 | |
- `'db1.table1'` - 匹配数据库 `db1` 中的特定表 `table1` | |
- `'db*.tbl*'` - 匹配以 `db` 开头的数据库和以 `tbl` 开头的表 | |
- `'!mysql.*'` - 排除 `mysql` 数据库中的所有表 | |
- `'*.*'`:匹配所有数据库和表。 | |
- `'db1.*'`:匹配数据库 `db1` 中的所有表。 | |
- `'db1.table1'`:匹配数据库 `db1` 中的特定表 `table1`。 | |
- `'db*.tbl*'`:匹配以 `db` 开头的数据库和以 `tbl` 开头的表。 | |
- `'!mysql.*'`:排除 `mysql` 数据库中的所有表。 |
> - 使用过滤器时,请确保过滤的数据保持引用完整性。 | ||
> - 过滤器选项适用于快照备份和日志备份恢复阶段。 | ||
> - 可以指定多个 `--filter` 选项来包含或排除不同的模式。 | ||
> - PITR 过滤暂不支持系统表。如果需要恢复特定的系统表,请使用 `br restore full` 命令并配合过滤器,该命令仅恢复快照备份数据(而非日志备份数据)。 | ||
> - 过滤器中指定的目标数据库和表在集群中必须不存在,否则恢复将失败并报错。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> - 使用过滤器时,请确保过滤的数据保持引用完整性。 | |
> - 过滤器选项适用于快照备份和日志备份恢复阶段。 | |
> - 可以指定多个 `--filter` 选项来包含或排除不同的模式。 | |
> - PITR 过滤暂不支持系统表。如果需要恢复特定的系统表,请使用 `br restore full` 命令并配合过滤器,该命令仅恢复快照备份数据(而非日志备份数据)。 | |
> - 过滤器中指定的目标数据库和表在集群中必须不存在,否则恢复将失败并报错。 | |
> - 使用过滤器恢复前,请确保目标集群中不存在与过滤器匹配的数据库或表,否则恢复将失败并报错。 | |
> - 过滤器选项适用于快照备份和日志备份的恢复阶段。 | |
> - 可以指定多个 `--filter` 选项来包含或排除不同的模式。 | |
> - PITR 过滤暂不支持系统表。如果需要恢复特定的系统表,请使用 `br restore full` 命令并配合过滤器,注意该命令仅恢复快照备份数据(而非日志备份数据)。 |
|
||
### 并发恢复操作 | ||
|
||
从 TiDB v9.0.0 开始,你可以同时运行多个 PITR 操作。此功能允许你同时恢复不同的数据集,提高大规模操作的恢复效率。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
从 TiDB v9.0.0 开始,你可以同时运行多个 PITR 操作。此功能允许你同时恢复不同的数据集,提高大规模操作的恢复效率。 | |
从 TiDB v9.0.0 开始,你可以同时执行多个 PITR 恢复任务。该功能允许你并行恢复不同的数据集,从而提升大规模恢复场景下的效率。 |
### 进行中的日志备份与快照恢复的兼容性 | ||
|
||
从 v9.0.0 开始,当存在日志备份任务时,如果**同时满足**以下条件,则可以正常进行快照恢复 (`br restore [full|database|table]`),并且恢复的数据可以被进行中的日志备份(下称“日志备份”)正常记录: | ||
从 v9.0.0 开始,当存在日志备份任务时,如果**同时满足**以下条件,则可以正常进行快照恢复 (`br restore [full|database|table]`),并且恢复的数据可以被进行中的日志备份(下称"日志备份")正常记录: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
从 v9.0.0 开始,当存在日志备份任务时,如果**同时满足**以下条件,则可以正常进行快照恢复 (`br restore [full|database|table]`),并且恢复的数据可以被进行中的日志备份(下称"日志备份")正常记录: | |
从 v9.0.0 开始,当存在日志备份任务时,如果**同时满足**以下条件,则可以正常进行快照恢复 (`br restore [full|database|table]`),并且恢复的数据可以被进行中的日志备份(下称“日志备份”)正常记录: |
如果不能同时满足上述条件,你可以通过以下步骤完成数据恢复: | ||
1. [停止日志备份任务](#停止日志备份任务)。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果不能同时满足上述条件,你可以通过以下步骤完成数据恢复: | |
1. [停止日志备份任务](#停止日志备份任务)。 | |
如果不能同时满足上述条件,你可以通过以下步骤完成数据恢复: | |
1. [停止日志备份任务](#停止日志备份任务)。 |
### 进行中的日志备份与 PITR 操作的兼容性 | ||
|
||
从 TiDB v9.0.0 开始,默认情况下你可以在日志备份任务运行时执行 PITR 操作。系统自动处理这些操作之间的兼容性。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
从 TiDB v9.0.0 开始,默认情况下你可以在日志备份任务运行时执行 PITR 操作。系统自动处理这些操作之间的兼容性。 | |
从 TiDB v9.0.0 开始,默认情况下,你可以在日志备份任务运行期间执行 PITR 操作。系统会自动处理这些操作之间的兼容性。 |
#### 进行中的日志备份与 PITR 的重要限制 | ||
|
||
当在运行日志备份的同时执行 PITR 操作时,恢复的数据将被记录在日志备份中。但是,在恢复时间窗口期间,由于日志恢复操作的性质,数据可能不一致。系统会将元数据写入外部存储,以标记无法保证一致性的时间范围和数据范围。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
当在运行日志备份的同时执行 PITR 操作时,恢复的数据将被记录在日志备份中。但是,在恢复时间窗口期间,由于日志恢复操作的性质,数据可能不一致。系统会将元数据写入外部存储,以标记无法保证一致性的时间范围和数据范围。 | |
当在运行日志备份的同时执行 PITR 操作时,恢复的数据也会被记录到日志备份中。但是,在恢复操作的时间窗口内,由于日志恢复操作的特性,可能存在数据不一致的风险。系统会将元数据写入外部存储,以标记无法保证一致性的时间范围和数据范围。 |
|
||
- 恢复到 `t1` 时间点(不一致时期之前的数据),或 | ||
- 在 `t2` 之后进行新的快照备份,并使用该备份进行未来的 PITR 操作 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果在时间范围 `[t1, t2)` 期间发生此类不一致,你无法恢复该时间段的数据。你必须: | |
- 恢复到 `t1` 时间点(不一致时期之前的数据),或 | |
- 在 `t2` 之后进行新的快照备份,并使用该备份进行未来的 PITR 操作 | |
如果在时间范围 `[t1, t2)` 期间发生此类不一致,你无法直接恢复该时间段的数据,需选择以下替代方案: | |
- 恢复到 `t1` 时间点(获取不一致时期之前的数据) | |
- 或在 `t2` 时间点后执行新的快照备份,并基于此备份进行后续 PITR 操作 |
First-time contributors' checklist
What is changed, added or deleted? (Required)
Which TiDB version(s) do your changes apply to? (Required)
Tips for choosing the affected version(s):
By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.
For details, see tips for choosing the affected versions (in Chinese).
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?