Skip to content

Commit 202e269

Browse files
authored
docs: add usage restriction introduction of Pitr (#453)
* docs: adjust content style * docs: add restriction of Pitr
1 parent 94b5460 commit 202e269

2 files changed

Lines changed: 60 additions & 40 deletions

File tree

pitr/README-zh.md

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
# 目录
22
```shell
33
使用说明
4-
前置条件
5-
服务器说明
6-
环境说明
7-
编译说明(可选)
8-
SSL 配置
9-
生成新的 SSL 密钥对(可选)
10-
部署说明
11-
步骤1:获取 Pitr 二进制
12-
下载二进制包
13-
自行编译
14-
步骤2:准备 ShardingSphere Proxy 配置
15-
步骤3:配置 OpenGauss
16-
步骤4:为 Pitr Agent 部署 SSL 证书
17-
步骤5:启动 Pitr Agent
18-
测试说明
19-
准备测试数据
20-
测试用例
21-
备份
22-
恢复
4+
前置准备
5+
服务器说明
6+
环境说明
7+
编译说明(可选)
8+
SSL 配置
9+
生成新的 SSL 密钥对(可选)
10+
部署说明
11+
步骤1:获取 Pitr 二进制
12+
下载二进制包
13+
自行编译
14+
步骤2:准备 ShardingSphere Proxy 配置
15+
步骤3:配置 OpenGauss
16+
步骤4:为 Pitr Agent 部署 SSL 证书
17+
步骤5:启动 Pitr Agent
18+
测试说明
19+
准备测试数据
20+
测试用例
21+
备份
22+
恢复
2323
```
2424

2525

2626
# 使用说明
2727

2828
本工具是面向 Apache ShardingSphere 和 OpenGauss 构建的分布式数据库集群提供的按时间点恢复(PITR,Point-in-time Recovery)功能的命令行工具。
2929

30-
## 前置条件
30+
## 前置准备
3131

3232
在开始之前,你需要准备如下三台服务器,并设置相关运行环境和安装所需依赖软件。这三台服务器的拓扑结构示意如下:
3333

@@ -375,4 +375,14 @@ delete from t_user where user_id=2;
375375
验证数据:
376376
```SQL
377377
select * from t_user;
378-
```
378+
```
379+
380+
# 使用限制
381+
382+
- 全局备份任务需要在没有进行中的事务的时间点进行开启,由 ShardingSphere 来加锁保证
383+
- ShardingSphere 备份元数据存储在 Pitr cli 本地,如果需要另一台设备上需要恢复,需要复制对应备份数据到对应设备
384+
- 恢复操作需要停机,并且为同步操作,用户需保证完全恢复成功
385+
- 恢复前后 OpenGauss 数据节点的 IP 地址和端口需保持不变
386+
- 多个 Pitr cli 客户端同时操作,只有一个 Pitr cli 客户端可执行成功
387+
- 当恢复失败时,OpenGauss 数据节点存在状态不一致,需用户重新发起恢复操作,保证最终恢复成功
388+
- 恢复时,保证 ShardingSphere 备份和恢复的版本一致,确保元数据兼容

pitr/README.md

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
# Content
22
```shell
3-
Prerequisition
4-
Servers
5-
Environment
6-
Compilation (optional)
7-
SSL Configurations
8-
Generate new SSL keypair (Optional)
9-
Deployment
10-
Step 1: Get Pitr tools
11-
Get binary release
12-
Compile it yourself
13-
Step 2: Get ShardingSphere Proxy Configurations
14-
Step 3: Set OpenGauss Configurations
15-
Step 4: Deploy SSL certs for Pitr Agent
16-
Step 5: Start Pitr Agent
17-
Test
18-
Prepare Test Data
19-
Test Case
20-
Backup
21-
Recovery
3+
README
4+
Prerequisition
5+
Servers
6+
Environment
7+
Compilation (optional)
8+
SSL Configurations
9+
Generate new SSL keypair (Optional)
10+
Deployment
11+
Step 1: Get Pitr tools
12+
Get binary release
13+
Compile it yourself
14+
Step 2: Get ShardingSphere Proxy Configurations
15+
Step 3: Set OpenGauss Configurations
16+
Step 4: Deploy SSL certs for Pitr Agent
17+
Step 5: Start Pitr Agent
18+
Test
19+
Prepare Test Data
20+
Test Case
21+
Backup
22+
Recovery
2223
```
2324

2425
# README
@@ -378,3 +379,12 @@ Verify data:
378379
select * from t_user;
379380
```
380381

382+
# Restrictions
383+
384+
- Global backup tasks need to be executed while there is no uncommitted transaction, and this will be ensuranced by ShardingSphere lock.
385+
- The backup metadata of ShardingSphere will be stored on the same host with the Pitr cli. You need to copy this metadata backup to the another host first where you want to start recovery.
386+
- The recovery operation need to stop service, and it is a synchonized operation. Users have to make sure the success of the recovery operation.
387+
- OpenGauss data nodes should use the same IP and port while backup and recovery
388+
- Only one Pitr cli could successfully if multiple cli are executed simutaneously
389+
- OpenGauss servers may under inconsistent status if recovery fails. Users need to try to recovery again until it is succeed.
390+
- Using the same version of ShardingSphere while backup and recovery to make sure the metadata is compatible.

0 commit comments

Comments
 (0)