Skip to content

add metabackup #13394

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions clinic/clinic-user-guide-for-tiup.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ summary: 详细介绍在使用 TiUP 部署的 TiDB 集群或 DM 集群上如何
> - 如需收集全量诊断数据,可以使用命令 `tiup diag collect <cluster-name> --include="system,monitor,log,config,db_vars,perf,debug"`。

- `-l`:传输文件时的带宽限制,单位为 Kbit/s,默认值为 `100000`(即 scp 的 `-l` 参数)。
- `-N/--node`:支持只收集指定节点的数据,格式为 `ip:port`。
- `-N/--node`:支持只收集指定节点的数据,格式为 `ip:port`。由于 Metrics 数据是从 Prometheus 服务上统一采集,不支持只收集指定节点的 Metrics 数据,该参数对 Metrics 收集无效。
- `--include`:只收集特定类型的数据,可选值为 `system`,`monitor`,`log`,`config`,`db_vars`。如需同时列出多种类型的数据,你可以使用逗号 `,` 来分割不同的数据类型。
- `--exclude`:不收集特定类型的数据,可选值为 `system`,`monitor`,`log`,`config`,`db_vars`。如需同时列出多种类型的数据,你可以使用逗号 `,` 来分割不同的数据类型。

Expand Down Expand Up @@ -292,7 +292,7 @@ summary: 详细介绍在使用 TiUP 部署的 TiDB 集群或 DM 集群上如何
诊断结果会在命令行中返回,示例如下:

```bash
Starting component `diag`: /root/.tiup/components/diag/v0.7.0/diag check diag-fNTnz5MGhr6
Starting component `diag`: /root/.tiup/components/diag/v1.1.0/diag check diag-fNTnz5MGhr6

# 诊断结果
lili 2022-01-24T09:33:57+08:00
Expand Down
17 changes: 17 additions & 0 deletions maintain-tidb-using-tiup.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,23 @@ server_configs:

然后执行 `tiup cluster reload ${cluster-name} -R tidb` 命令滚动重启。

## 备份与恢复集群部署和运维所需的 meta 文件

如果运维所需的 meta 文件丢失,会导致无法继续使用 TiUP 管理集群,建议通过以下方式定期备份 meta 文件:

```bash
tiup cluster meta backup ${cluster_name}
```

如果 meta 文件丢失,可以使用以下方法恢复 meta 文件:

```bash
tiup cluster meta restore ${cluster_name} ${backup_file}
```

> **注意:**
>
> 恢复操作会覆盖当前的 meta 文件,建议仅在 meta 文件丢失的情况下进行恢复。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> 恢复操作会覆盖当前的 meta 文件,建议仅在 meta 文件丢失的情况下进行恢复。
> 恢复操作会覆盖当前的 meta 文件,建议仅在 meta 文件丢失的情况下进行恢复。

## Hotfix 版本替换

常规的升级集群请参考[升级文档](/upgrade-tidb-using-tiup.md),但是在某些场景下(例如 Debug),可能需要用一个临时的包替换正在运行的组件,此时可以用 `patch` 命令:
Expand Down
13 changes: 13 additions & 0 deletions production-deployment-using-tiup.md
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,19 @@ tiup cluster display tidb-test

预期结果输出:各节点 Status 状态信息为 `Up` 说明集群状态正常。

## 第 9 步:备份集群部署和运维所需的 meta 文件

如果运维所需的 meta 文件丢失,会导致无法继续使用 TiUP 管理集群,建议通过以下方式定期备份 meta 文件:

```bash
tiup cluster meta backup ${cluster_name}
```
如果 meta 文件丢失,可以使用以下方法恢复 meta 文件:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
如果 meta 文件丢失,可以使用以下方法恢复 meta 文件:
如果 meta 文件丢失,可以使用以下方法恢复 meta 文件:


```bash
tiup cluster meta restore ${cluster_name} ${backup_file}
```

## 探索更多

如果你已同时部署了 [TiFlash](/tiflash/tiflash-overview.md),接下来可参阅以下文档:
Expand Down