-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add document of dumpling, the new export tool #3151
Conversation
@3pointer PTAL~ 另外还有几个问题需要确认一下:
|
@@ -6,6 +6,12 @@ aliases: ['/docs-cn/dev/how-to/maintain/backup-and-restore/mydumper-lightning/', | |||
|
|||
# 使用 Mydumper/TiDB Lightning 进行备份与恢复 |
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.
这个文档标题直接改成 使用 dumpling/TiDB Lightning 进行备份与恢复
怎么样?
下面就不用再特殊说明使用 dumpling 替换 mydumper 了
@3pointer 感觉咋样?
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.
如果 dumpling 定位是已经可以代替 mydumper 进行 tidb 的备份,建议 dumpling/TiDB Lightning 进行备份与恢复
,然后 mydumper 独立一个文档,用 Deprecated
标识出来。
另外感觉缺一个说明,比如,什么时候选择 dumpling+lightning ,什么时候选择 BR备份,什么时候用 CDC 增量备份,什么时候用 BR 增量备份
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.
在 tools 的 use guide 里有这个说明
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.
放在 tools 的 guide 里不太合适,用户从备份这里进来,会错过,应该在备份这里加一个总述
export-using-dumpling.md
Outdated
|
||
这个命令中,`-H`,`-P`,`-u` 是经典的“地址,端口,用户”三元组。如果需要密码验证,可以用 `-p $YOUR_SECRET_PASSWORD` 传给 Dumpling。 | ||
|
||
默认情况下,除了系统数据库中的表之外,Dumpling 会导出整个数据库的表。你可以使用 `--where` 来选定要导出的记录。假如导出数据的格式是 CSV(使用 `--filetype csv` 即可导出 CSV 文件),还可以使用 `--sql` 导出指定 SQL 选择出来的记录。 |
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.
不支持指定表的话,--where column=xxx 是如何指定条件呢?可以增加 --where 和 --sql 的例子
export-using-dumpling.md
Outdated
|
||
默认情况下,导出的文件会存储到 `./export-<current local time>` 目录下。你可以使用 `-o` 来选择存储导出文件的目录。`-F` 选项能够指定单个文件的最大大小(和 MyDumper 不同,这里的单位是字节),与之相似的是 `-r` 选项,它指定单个文件的最大记录数(或者说,数据库中的行数)。利用这些参数可以让 Dumpling 的并行度更高。 | ||
|
||
除此之外,你可以使用 `--snapshot` 标志来指定欲导出快照的时间戳。与之相关的是 `--consistency`,这个标志控制导出数据“一致性保证”的方式。对于 TiDB 来说,默认情况下我们会通过获取某个时间戳的快照来保证一致性,因此我们才可以使用 `--snapshot` 参数指定要备份的时间戳。 |
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.
这句感觉不太清晰,要先指定--consistency,才能指定--snapshot吗?否则导出的是不一致性的?建议重新组织一下语言
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.
这两处已经修改~现在的怎么样?
Signed-off-by: sre-bot <sre-bot@pingcap.com>
|
||
上述命令中,`-H`、`-P`、`-u` 分别是地址,端口,用户。如果需要密码验证,可以用 `-p $YOUR_SECRET_PASSWORD` 传给 Dumpling。 | ||
|
||
默认情况下,除了系统数据库中的表之外,Dumpling 会导出整个数据库的表。你可以使用 `--where <SQL where expression>` 来选定要导出的记录。假如导出数据的格式是 CSV(使用 `--filetype csv` 即可导出 CSV 文件),还可以使用 `--sql <SQL>` 导出指定 SQL 选择出来的记录,例如,导出 `test.sbtest1` 中所有 `id < 100` 的记录: |
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.
s/系统数据库中的表/系统表?是一个意思吗 @YuJuncen
/run-cherry-picker |
/run-cherry-picker |
/run-cherry-picker |
cherry pick to release-3.1 failed |
/run-cherry-picker |
cherry pick to release-3.1 failed |
/run-cherry-picker |
cherry pick to release-3.1 failed |
* cherry pick #3497 to release-3.1 Signed-off-by: sre-bot <sre-bot@pingcap.com> * Update TOC.md * manually cp from #3151 * relocate * *: remove content about CDC Co-authored-by: Xuecheng Zhang <csuzhangxc@gmail.com> Co-authored-by: yikeke <yikeke@pingcap.com> Co-authored-by: Keke Yi <40977455+yikeke@users.noreply.github.com>
What is changed, added or deleted? (Required)
为 MyDumper 增加了 Deprecated 信息。Which TiDB version(s) do your changes apply to? (Required)