-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add FAQ documents to BR #3344
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
Merged
Merged
Add FAQ documents to BR #3344
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
30e1abd
br: add faq
a9d8798
Update backup-and-restore-faq.md
YuJuncen d8eb4cb
Apply suggestions from code review
YuJuncen 2ccdf92
Update backup-and-restore-faq.md
YuJuncen b2831d4
Update backup-and-restore-faq.md
YuJuncen df0b3c2
Update br/backup-and-restore-faq.md
YuJuncen c6ec779
Apply suggestions from code review
YuJuncen be4f8dd
Merge branch 'docs-special-week' into faq
YuJuncen 64b71d2
Apply suggestions from code review
YuJuncen df80b3d
Apply suggestions from code review
YuJuncen d040ebf
Update backup-and-restore-faq.md
YuJuncen 95e7eda
Update backup-and-restore-faq.md
YuJuncen b6d14f7
Update troubleshoot-tidb-lightning.md
YuJuncen f955337
Update br/backup-and-restore-faq.md
YuJuncen 2a7e30c
change format
toutdesuite e65a4c4
change format
toutdesuite 777d426
Merge branch 'docs-special-week' into faq
toutdesuite 5ada550
Update br/backup-and-restore-faq.md
YuJuncen b8dc48f
br: add a answer to...
YuJuncen d37f594
Merge branch 'docs-special-week' into faq
YuJuncen 1f1863c
Update TOC.md
toutdesuite File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| --- | ||
| title: Backup & Restore 常见问题 | ||
| summary: BR 相关的常见问题以及解决方法。 | ||
| category: FAQ | ||
| --- | ||
|
|
||
| # Backup & Restore 常见问题 | ||
|
|
||
| 本文列出了在使用 Backup & Restore (BR) 时,可能会遇到的问题及相应的解决方法。 | ||
|
|
||
| 如果遇到未包含在此文档且无法解决的问题,可以在 [AskTUG](http://asktug.com) 社区中提问。 | ||
|
|
||
| ## 恢复的时候,报错 `could not read local://...:download sst failed`,该如何处理? | ||
|
|
||
| 在恢复的时候,每个节点都必须能够访问到**所有**的备份文件(SST files),默认情况下,假如使用 local storage,备份文件会分散在各个节点中,此时是无法直接恢复的,必须将每个 TiKV 节点的备份文件拷贝到其它所有 TiKV 节点才能恢复。 | ||
|
|
||
| 建议在备份的时候挂载一块 NFS 网盘作为备份盘,详见[将单表数据备份到网络盘](/br/backup-and-restore-use-cases.md#将单表数据备份到网络盘推荐)。 | ||
|
|
||
| ## BR 备份时,对集群影响多大? | ||
|
|
||
| 使用 `sysbench` 的 `oltp_read_only` 场景全速备份到非服务盘,对集群的影响依照表结构的不同,对集群 QPS 的影响在 15%~25% 之间。 | ||
|
|
||
| 如果需要控制备份带来的影响,可以使用 `--ratelimit` 参数限速。 | ||
|
|
||
| ## BR 会备份系统表吗?在数据恢复的时候,这些系统表会冲突吗? | ||
|
|
||
| 全量备份的时候会过滤掉系统库(`information_schema`,`performance_schema`,`mysql`)。参考[备份原理](/br/backup-and-restore-tool.md#备份原理)。 | ||
|
|
||
| 因为这些系统库根本不可能存在于备份中,恢复的时候自然不可能发生冲突。 | ||
|
|
||
| ## BR 遇到 Permission denied 错误,即使用 root 运行 BR 也无法解决,该如何处理? | ||
|
|
||
| 需要确认 TiKV 是否有访问备份目录的权限。如果是备份,确认是否有写权限;如果是恢复,确认是否有读权限。 | ||
|
|
||
| 使用 root 运行 BR 仍旧有可能会因为磁盘权限而失败,因为备份文件 (SST) 的保存是由 TiKV 执行的。 | ||
|
|
||
| > **注意:** | ||
| > | ||
| > 在恢复的时候也可能遇到同样的问题。BR 的恢复中,在检验读权限的时机是在第一次写入 SST 文件时,考虑到执行 DDL 的耗时,这个时刻可能会离开始运行 BR 的时间很远。 | ||
| > | ||
| > 这样可能会出现等了很长时间之后遇到 Permission denied 错误失败的情况。 | ||
| > | ||
| > 因此,最好在恢复前提前检查权限。 | ||
|
|
||
| ## BR 遇到错误信息 `Io(Os { ... })`,该如何处理? | ||
|
|
||
| 这类问题几乎都是 TiKV 在写盘的时候遇到的系统调用错误。检查备份目录的挂载方式和文件系统,试试看备份到其它文件夹或者其它硬盘。 | ||
|
|
||
| 目前已知备份到 samba 搭建的网盘时可能会遇到 `Code: 22(invalid argument)` 错误。 | ||
|
|
||
| ## 使用 local storage 的时候,BR 备份的文件会存在哪里? | ||
|
|
||
| 在使用 local storage 的时候,会在运行 BR 的节点生成 `backupmeta`,在各个 Region 的 Leader 节点生成备份文件。 | ||
|
|
||
| ## 备份数据有多大,备份会有副本吗? | ||
|
|
||
| 备份的时候仅仅在每个 Region 的 Leader 处生成该 Region 的备份文件。因此备份的大小等于数据大小,不会有多余的副本数据。所以最终的总大小大约是 TiKV 数据总量除以副本数。 | ||
|
|
||
| 但是假如想要从本地恢复数据,因为每个 TiKV 都必须要能访问到所有备份文件,在最终恢复的时候会有等同于恢复时 TiKV 节点数量的副本。 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.