Skip to content
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

backup: add time zone in examples #17705

Merged
merged 2 commits into from
Jun 21, 2024
Merged
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 br/backup-and-restore-use-cases.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ checkpoint[global]: 2022-05-13 11:31:47.2 +0800; gap=4m53s
```shell
tiup br backup full --pd="${PD_IP}:2379" \
--storage='s3://tidb-pitr-bucket/backup-data/snapshot-20220514000000' \
--backupts='2022/05/14 00:00:00'
--backupts='2022/05/14 00:00:00 +08:00'
```

- 在 2022/05/16 00:00:00 执行一次快照备份:

```shell
tiup br backup full --pd="${PD_IP}:2379" \
--storage='s3://tidb-pitr-bucket/backup-data/snapshot-20220516000000' \
--backupts='2022/05/16 00:00:00'
--backupts='2022/05/16 00:00:00 +08:00'
```

## 执行 PITR
Expand Down
4 changes: 2 additions & 2 deletions br/br-snapshot-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ aliases: ['/zh/tidb/dev/br-usage-backup/','/zh/tidb/dev/br-usage-restore/','/zh/

```shell
tiup br backup full --pd "${PD_IP}:2379" \
--backupts '2022-09-08 13:30:00' \
--backupts '2022-09-08 13:30:00 +08:00' \
--storage "s3://backup-101/snapshot-202209081330?access-key=${access-key}&secret-access-key=${secret-access-key}" \
--ratelimit 128 \
```

以上命令中:

- `--backupts`:快照对应的物理时间点,格式可以是 [TSO](/glossary.md#tso) 或者时间戳,例如 `400036290571534337` 或者 `2018-05-11 01:42:23`。如果该快照的数据被垃圾回收 (GC) 了,那么 `tiup br backup` 命令会报错并退出。如果你没有指定该参数,那么 br 会选取备份开始的时间点所对应的快照。
- `--backupts`:快照对应的物理时间点,格式可以是 [TSO](/glossary.md#tso) 或者时间戳,例如 `400036290571534337` 或者 `2018-05-11 01:42:23 +08:00`。如果该快照的数据被垃圾回收 (GC) 了,那么 `tiup br backup` 命令会报错并退出。使用日期方式备份时,建议同时指定时区,否则 br 默认使用本地时间构造时间戳,可能导致备份时间点错误。如果你没有指定该参数,那么 br 会选取备份开始的时间点所对应的快照。
- `--storage`:数据备份到的存储地址。快照备份支持以 Amazon S3、Google Cloud Storage、Azure Blob Storage 为备份存储,以上命令以 Amazon S3 为示例。详细存储地址格式请参考[外部存储服务的 URI 格式](/external-storage-uri.md)。
- `--ratelimit`:**每个 TiKV** 备份数据的速度上限,单位为 MiB/s。

Expand Down
2 changes: 1 addition & 1 deletion br/br-snapshot-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ summary: 介绍备份与恢复 TiDB 集群快照的命令行。
```shell
tiup br backup full \
--pd "${PD_IP}:2379" \
--backupts '2022-09-08 13:30:00' \
--backupts '2022-09-08 13:30:00 +08:00' \
--storage "s3://${backup_collection_addr}/snapshot-${date}?access-key=${access-key}&secret-access-key=${secret-access-key}" \
--ratelimit 128 \
--log-file backupfull.log
Expand Down