Skip to content

Commit

Permalink
backup: add time zone in examples (#17705) (#17768)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot authored Jun 24, 2024
1 parent c41e429 commit 2b01c11
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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 @@ -119,15 +119,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 @@ -25,14 +25,14 @@ summary: 了解如何使用 br 命令行工具进行 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-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) 了,那么 `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
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

0 comments on commit 2b01c11

Please sign in to comment.