-
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 mydumper #923
*: add mydumper #923
Conversation
FAQ.md
Outdated
@@ -656,7 +656,7 @@ TiDB 设计的目标就是针对 MySQL 单台容量限制而被迫做的分库 | |||
|
|||
#### 3.6.1 TiDB 主要备份方式? | |||
|
|||
目前 TiDB 主要依赖 mydumper 逻辑导出进行备份,具体可以参考 [https://github.com/maxbube/mydumper](https://github.com/maxbube/mydumper),虽然 TiDB 也支持使用 MySQL 官方的 mysqldump 工具来进行数据的备份恢复工作,但相比于 mydumper/loader,性能会慢很多,大量数据的备份恢复会花费很多时间,这里我们并不推荐。 | |||
目前,推荐的备份方式是使用 [PingCAP fork of mydumper](tools/mydumper.md)。尽管 TiDB 也支持使用 MySQL 官方工具 `mysqldump` 进行数据备份、恢复,但其性能低于 [`mydumper`](tools/mydumper.md)/[`loader`](tools/loader.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.
"PingCAP fork of mydumper" can also be translated to Chinese 「PingCAP 的 mydumper 分支」。
FAQ.md
Outdated
|
||
具体可以参考 [https://github.com/maxbube/mydumper](https://github.com/maxbube/mydumper)。 | ||
参见 [mydumper Instructions](tools/mydumper.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.
"Instructions" → "使用文档"
FAQ.md
Outdated
|
||
参见 [Loader Instructions](tools/loader.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.
"Instructions" → "使用文档"
op-guide/backup-restore.md
Outdated
|
||
> **注意**:虽然 TiDB 也支持使用 MySQL 官方的 `mysqldump` 工具来进行数据的备份恢复工作,但相比于 `mydumper` / `loader`,性能会慢很多,大量数据的备份恢复会花费很多时间,这里我们并不推荐。 | ||
> **注意**:必须使用 Enterprise Tools package 的 `mydumper`,不要使用你的操作系统的 package manager 提供的 `mydumper`。`mydumper` 的上游版本并不能正确对 TiDB 进行处理 ([#155](https://github.com/maxbube/mydumper/pull/155))。由于使用 `mydumper` 进行数据备份和恢复都要耗费许多时间,这里也并不推荐。 |
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.
"package" → 包
"package manager" → (软件)包管理工具
"Enterprise Tools" seems to be named as "企业版工具集" here (from what I've read from the Syncer docs).
由于使用
mydumper
进行数据备份和恢复都要耗费许多时间,这里也并不推荐。
"mydumper" should be mysqldump
🙃
tools/mydumper.md
Outdated
|
||
+ `INSERT` 语句中包含隐藏的 `_tidb_rowid` 列 | ||
|
||
+ 允许 `tidb_snapshot` 为 [configurable](../op-guide/history-read.md#how-tidb-reads-data-from-history-versions) (即备份之前的数据) |
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.
configurable = "可设置的", so I'd translate it as:
+ [允许设置](......) `tidb_snapshot` 的值 (即是可备份不同时间点的数据)
BTW the anchor #how-tidb-reads-data-from-history-versions
probably needs to be updated to match the Chinese title.
tools/mydumper.md
Outdated
``` | ||
-z, --tidb-snapshot: Set the tidb_snapshot to be used for the backup. | ||
Default: NOW()-INTERVAL 1 SECOND. | ||
Accepts either a TSO or valid datetime. For example: -z "2016-10-08 16:45:26" |
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.
This also needs to be translated as well I believe.
tools/mydumper.md
Outdated
|
||
PingCAP 的 mydumper 源码 [位于 GitHub](https://github.com/pingcap/mydumper)。 | ||
|
||
### 是否计划未来让 PingCAP 的 mydumper 对上游的 mydumper 生效? |
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.
I think it would be more natural to write this like
未来是否计划让 PingCAP 对 mydumper 的改动合并到上游?
op-guide/backup-restore.md
Outdated
|
||
> **注意**:虽然 TiDB 也支持使用 MySQL 官方的 `mysqldump` 工具来进行数据的备份恢复工作,但相比于 `mydumper` / `loader`,性能会慢很多,大量数据的备份恢复会花费很多时间,这里我们并不推荐。 | ||
> **注意**:必须使用企业版工具集包 的 `mydumper`,不要使用你的操作系统的包管理工具提供的 `mydumper`。`mydumper` 的上游版本并不能正确对 TiDB 进行处理 ([#155](https://github.com/maxbube/mydumper/pull/155))。由于使用 `mysqldump` 进行数据备份和恢复都要耗费许多时间,这里也并不推荐。 |
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.
- Delete the extra space after "工具集包".
- It seems that "并不能对 TiDB 进行正确处理" sounds better.
tools/mydumper.md
Outdated
|
||
### 新添参数 | ||
|
||
``` |
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.
Add bash
for the code block.
tools/mydumper.md
Outdated
|
||
命令行参数: | ||
|
||
``` |
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.
Ditto
tools/mydumper.md
Outdated
|
||
### 未来是否计划让 PingCAP 对 mydumper 的改动合并到上游? | ||
|
||
是的,PingCAP 团队计划让此 mydumper 对上游的 mydumper 生效。参见 [PR #155](https://github.com/maxbube/mydumper/pull/155). |
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.
让此 mydumper 对上游的 mydumper 生效 -> 将对 mydumper 的改动合并到上游
tools/mydumper.md
Outdated
## 相比于普通的 mydumper,此工具有哪些改进之处? | ||
|
||
+ 使用 `tidb_snapshot` 而非 `FLUSH TABLES WITH READ LOCK` 提供备份一致性 | ||
|
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.
For such a list without sublist or detailed explanation, the blank line between each item is unnecessary. You can just remove it.
@lilin90 Thanks. PTAL again. |
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.
LGTM
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.
Rest LGTM.
|
||
```bash | ||
-z, --tidb-snapshot: 设置 tidb_snapshot 用于备份 | ||
默认值:NOW()-INTERVAL 1 SECOND |
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.
The default value has been recently changed to the output of SHOW MASTER STATUS
🙂
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.
I've created pingcap/docs#693 to handle the defaults change.
via pingcap/docs#644
@lilin90 @kennytm PTAL. Thanks!