You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2020/05/18 04:04:56 UTC
[incubator-doris] branch revert-3581-update_doc_2 created (now
e58a9d5)
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a change to branch revert-3581-update_doc_2
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git.
at e58a9d5 Revert "[Doc] Update table-restore-tool.md"
This branch includes the following new commits:
new e58a9d5 Revert "[Doc] Update table-restore-tool.md"
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[incubator-doris] 01/01: Revert "[Doc] Update table-restore-tool.md"
Posted by mo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch revert-3581-update_doc_2
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
commit e58a9d53b9700435b70e7e6afabbbdcd743c7d83
Author: Mingyu Chen <mo...@gmail.com>
AuthorDate: Mon May 18 12:04:49 2020 +0800
Revert "[Doc] Update table-restore-tool.md"
---
.../operation/tablet-restore-tool.md | 32 ++++++++--------------
1 file changed, 11 insertions(+), 21 deletions(-)
diff --git a/docs/zh-CN/administrator-guide/operation/tablet-restore-tool.md b/docs/zh-CN/administrator-guide/operation/tablet-restore-tool.md
index 7843663..5f1e176 100644
--- a/docs/zh-CN/administrator-guide/operation/tablet-restore-tool.md
+++ b/docs/zh-CN/administrator-guide/operation/tablet-restore-tool.md
@@ -30,20 +30,15 @@ under the License.
用户在使用Doris的过程中,可能会发生因为一些误操作或者线上bug,导致一些有效的tablet被删除(包括元数据和数据)。为了防止在这些异常情况出现数据丢失,Doris提供了回收站机制,来保护用户数据。用户删除的tablet数据不会被直接删除,会被放在回收站中存储一段时间,在一段时间之后会有定时清理机制将过期的数据删除。回收站中的数据包括:tablet的data文件(.dat),tablet的索引文件(.idx)和tablet的元数据文件(.hdr)。数据将会存放在如下格式的路径:
-```
/root_path/trash/time_label/tablet_id/schema_hash/
-```
-
-* `root_path`:对应BE节点的某个数据根目录。
-* `trash`:回收站的目录。
-* `time_label`:时间标签,为了回收站中数据目录的唯一性,同时记录数据时间,使用时间标签作为子目录。
-当用户发现线上的数据被误删除,需要从回收站中恢复被删除的tablet,需要用到这个tablet数据恢复功能。
+其中, root path是用户配置的一块盘上be存储的根目录;
+trash:是回收站的目录
+time_label: 时间标签,为了回收站中数据目录的唯一性,同时记录数据时间,使用时间标签作为子目录
-BE提供http接口和 `restore_tablet_tool.sh` 脚本实现这个功能,支持单tablet操作(single mode)和批量操作模式(batch mode)。
-
-* 在single mode下,支持单个tablet的数据恢复。
-* 在batch mode下,支持批量tablet的数据恢复。
+当用户发现线上的数据被误删除,需要从回收站中恢复被删除的tablet,需要用到这个tablet数据恢复功能。BE提供http接口和restore_tablet_tool.sh脚本实现这个功能,支持单tablet操作(single mode)和批量操作模式(batch mode)。
+在single mode下,支持单个tablet的数据恢复。
+在batch mode下,支持批量tablet的数据恢复。
## 操作
@@ -54,24 +49,23 @@ BE提供http接口和 `restore_tablet_tool.sh` 脚本实现这个功能,支持
BE中提供单个tablet数据恢复的http接口,接口如下:
```
-curl -X POST "http://be_host:be_webserver_port/api/restore_tablet?tablet_id=11111\&schema_hash=12345"
+curl -X POST "http://localhost:8040/api/restore_tablet?tablet_id=11111\&schema_hash=12345"
```
-成功的结果如下:
+成功的结果如下:
```
{"status": "Success", "msg": "OK"}
```
失败的话,会返回相应的失败原因,一种可能的结果如下:
-
```
{"status": "Failed", "msg": "create link path failed"}
```
#### 脚本方式
-`restore_tablet_tool.sh` 可用来实现单tablet数据恢复的功能。
+restore_tablet_tool.sh可用来实现单tablet数据恢复的功能。
```
sh tools/restore_tablet_tool.sh -b "http://127.0.0.1:8040" -t 12345 -s 11111
@@ -80,19 +74,15 @@ sh tools/restore_tablet_tool.sh --backend "http://127.0.0.1:8040" --tablet_id 12
### batch mode
-批量恢复模式用于实现恢复多个tablet数据的功能。
-
-使用的时候需要预先将恢复的tablet id和schema hash按照逗号分隔的格式放在一个文件中,一个tablet一行。
-
+批量恢复模式用于实现恢复多个tablet数据的功能。使用的时候需要预先将恢复的tablet id和schema hash按照逗号分隔的格式放在一个文件中,一个tablet一行。
格式如下:
-
```
12345,11111
12346,11111
12347,11111
```
-然后如下的命令进行恢复(假设文件名为:`tablets.txt`):
+然后如下的命令进行恢复(假设文件名为:tablets.txt):
```
sh restore_tablet_tool.sh -b "http://127.0.0.1:8040" -f tablets.txt
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org