br: document restore with --rename - #21936
LykxSassinator wants to merge 2 commits into
Conversation
Document the experimental `--rename` flag of BR restore, which restores backup data into a different schema or table: - Add a "恢复到不同的库表名" section to the snapshot and PITR command manuals, covering rule syntax, table-rule precedence over schema rules, case-insensitive matching, pre-restore validation of duplicate/conflicting rules, supported commands, and limitations. - Document that the rename rules are recorded in the restore checkpoint and the PITR ID Map, so a later restore (including log-only restore) must use the same rules. - Update the outdated note that data can only be restored into a database with the same name when using `br restore db`. - Mention the flag in the br command-line manual, the snapshot/PITR usage guides, the overview usage limitations, and the incremental backup limitations. The flag is available from TiDB v9.0.0 and is marked as an experimental feature at every entry point. Related code PR: pingcap/tidb#70590 Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @LykxSassinator. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
📝 WalkthroughWalkthrough文档新增 BR 恢复的 ChangesBR 恢复库表重命名
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~8 minutes Change: Other Merge Risk: 🔵 Low · up to Users restoring PITR from incremental backups may not know whether 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Advanced
Run ID: 9f8e0f35-620b-4649-b780-b60eebb97c56
📒 Files selected for processing (7)
br/backup-and-restore-overview.mdbr/br-incremental-guide.mdbr/br-pitr-guide.mdbr/br-pitr-manual.mdbr/br-snapshot-guide.mdbr/br-snapshot-manual.mdbr/use-br-command-line-tool.md
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.
|
For Please add the following parts into |
Signed-off-by: lucasliang <nkcs_lykx@hotmail.com>
There was a problem hiding this comment.
🟡 Minor · 明确增量源 PITR 的 --rename 边界。
br/br-pitr-manual.md:565-590
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win明确增量源 PITR 的
--rename边界。
br/br-pitr-manual.md:412允许--full-backup-storage指向增量备份地址,但br/br-incremental-guide.md:24禁止增量恢复使用--rename。本节只展示了全量快照作为源的 PITR 示例,未说明该限制是否适用于restore point的增量源模式。请明确该组合是否支持--rename;如果支持,请说明必须设置--allow-pitr-from-incremental=true,否则请明确禁止该组合。
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Advanced
Run ID: 5fa578de-3ff4-4f43-829b-d9fc6217c8c8
📒 Files selected for processing (1)
br/br-snapshot-manual.md
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.
First-time contributors' checklist
What is changed, added, or deleted? (Required)
Document the experimental
--renameflag of BR restore, which restores backup datainto a different schema or table (pingcap/tidb#70590).
Changes by file:
br/br-snapshot-manual.md(+59 −1)恢复到不同的库表名: rule syntax (源库名:目标库名/源库名.源表名:目标库名.目标表名), table-rule precedence over schema rules,case-insensitive matching, pre-restore validation of duplicate/conflicting rules,
a
br restore fullexample, and the limitations.恢复单个数据库的数据that said data can only berestored into a database with the same name.
br/br-pitr-manual.md(+34)--renameline to thebr restore point --helpsample.so a later restore (including log-only restore) must use the same rules, otherwise
the restore fails with
restore rename rules do not match the log restore checkpoint.br/use-br-command-line-tool.md(+2)--renameto常用选项and to the restore command index.br/br-snapshot-guide.md(+22) /br/br-pitr-guide.md(+2)br/backup-and-restore-overview.md/br/br-incremental-guide.md(+1each)supported, and neither are
restore raw/restore txn.The flag is available from TiDB v9.0.0. Because of the possible hidden risk, the feature is
marked as an experimental feature at every entry point, using the repository's standard
warning block (
该功能为实验特性,不建议在生产环境中使用。该功能可能会在未事先通知的情况下发生变化或删除。…).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)?
AI agent involvement
Do your changes match any of the following descriptions?
Summary by CodeRabbit
--rename将快照恢复和 PITR 数据映射到不同库表名的说明及示例。restore raw、restore txn及--no-schema不支持--rename。