This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new fcdd1b96d2 [docs](delete-recover) merge docs: recover catalog and 
recover tablet trash #22525
fcdd1b96d2 is described below

commit fcdd1b96d2e290b11b5667a02dba75712b5ff5c4
Author: yujun <yu.jun.re...@gmail.com>
AuthorDate: Sat Aug 5 10:31:48 2023 +0800

    [docs](delete-recover) merge docs: recover catalog and recover tablet trash 
#22525
    
    Doris trash include FE catalog recycle bin and BE tablet trash. Users 
sometimes may be confused abount them. Put them together to let them better 
understand.
---
 .../docs/admin-manual/data-admin/delete-recover.md | 145 ++++++++++++++++++-
 .../admin-manual/maint-monitor/disk-capacity.md    |   2 +-
 .../maint-monitor/tablet-restore-tool.md           | 136 ------------------
 docs/sidebars.json                                 |   1 -
 .../docs/admin-manual/data-admin/delete-recover.md | 160 ++++++++++++++++++++-
 docs/zh-CN/docs/admin-manual/data-admin/restore.md |   4 +-
 .../admin-manual/maint-monitor/disk-capacity.md    |   2 +-
 .../maint-monitor/tablet-restore-tool.md           | 142 ------------------
 8 files changed, 302 insertions(+), 290 deletions(-)

diff --git a/docs/en/docs/admin-manual/data-admin/delete-recover.md 
b/docs/en/docs/admin-manual/data-admin/delete-recover.md
index f13b0df21e..3d5eeb45fd 100644
--- a/docs/en/docs/admin-manual/data-admin/delete-recover.md
+++ b/docs/en/docs/admin-manual/data-admin/delete-recover.md
@@ -26,9 +26,34 @@ under the License.
 
 # Data Deletion Recovery
 
+Data deletion recovery includes two situations:
+
+1. After executing the command `drop database/table/partition`,  user can use 
command `recover` to recover all the data in the entire 
database/table/partition. It will restore the metadata of the 
database/table/partition from the FE's catalog recycle bin, change them from 
invisible to visible again, and the data will also be visible again;
+
+2. Due to some misoperations or online bugs, some tablets on BEs are deleted, 
and these tablets can be rescued from the BE's trash through maintenance tools.
+
+The above two, the former is aimed at the fact that the 
database/table/partition is no longer visible on FE, and the metadata of the 
database/table/partition is still kept in the catalog recycle bin of FE. The 
latter is aimed at databases/tables/partitions that are visible on FE, but some 
BE tablet data is deleted.
+
+The two recovery methods are described below.
+
+## Drop Recovery
+
 In order to avoid disasters caused by misoperation, Doris supports data 
recovery of accidentally deleted databases/tables/partitions. After dropping 
table or database, Doris will not physically delete the data immediately, but 
will keep it in Trash for a period of time ( The default is 1 day, which can be 
configured through the `catalog_trash_expire_second` parameter in fe.conf). The 
administrator can use the RECOVER command to restore accidentally deleted data.
 
-## Start Data Recovery
+**Note that if it is deleted using `drop force`, it will be deleted directly 
and cannot be recovered.**
+
+### Query Catalog Recycle Bin
+
+Query FE catalog recycle bin
+
+```sql
+SHOW CATALOG RECYCLE BIN [ WHERE NAME [ = "name" | LIKE "name_matcher"] ]
+```
+
+For more detailed syntax and best practices, please refer to the 
[SHOW-CATALOG-RECYCLE-BIN](../../sql-manual/sql-reference/Show-Statements/SHOW-CATALOG-RECYCLE-BIN.md)
 command manual, You can also type `help SHOW CATALOG RECYCLE BIN` on the MySql 
client command line for more help.
+
+
+### Start Data Recovery
 
 1.restore the database named example_db
 
@@ -48,6 +73,120 @@ RECOVER TABLE example_db.example_tbl;
 RECOVER PARTITION p1 FROM example_tbl;
 ```
 
-## More Help
-
 For more detailed syntax and best practices used by RECOVER, please refer to 
the 
[RECOVER](../../sql-manual/sql-reference/Database-Administration-Statements/RECOVER.md)
 command manual, You can also type `HELP RECOVER` on the MySql client command 
line for more help.
+
+## Tablet Restore Tool
+
+
+### Restore data from BE Recycle Bin
+
+During the user's use of Doris, some valid tablets (including metadata and 
data) may be deleted due to some misoperations or online bugs. In order to 
prevent data loss in these abnormal situations, Doris provides a recycle bin 
mechanism to protect user data. Tablet data deleted by users will not be 
deleted directly, but will be stored in the recycle bin for a period of time. 
After a period of time, there will be a regular cleaning mechanism to delete 
expired data. By default, when the di [...]
+
+The data in the BE recycle bin includes: tablet data file (.dat), tablet index 
file (.idx) and tablet metadata file (.hdr). The data will be stored in a path 
in the following format:
+
+```
+/root_path/trash/time_label/tablet_id/schema_hash/
+```
+
+* `root_path`: a data root directory corresponding to the BE node.
+* `trash`: The directory of the recycle bin.
+* `time_label`: Time label, for the uniqueness of the data directory in the 
recycle bin, while recording the data time, use the time label as a 
subdirectory.
+
+When a user finds that online data has been deleted by mistake, he needs to 
recover the deleted tablet from the recycle bin. This tablet data recovery 
function is needed.
+
+BE provides http interface and `restore_tablet_tool.sh` script to achieve this 
function, and supports single tablet operation (single mode) and batch 
operation mode (batch mode).
+
+* In single mode, data recovery of a single tablet is supported.
+* In batch mode, support batch tablet data recovery.
+
+In addition, users can use the command `show trash` to view the trash data 
capacity in BE, and use the command `admin clean trash` to clear the trash data 
in BE.
+
+#### Operation
+
+##### single mode
+
+1. http request method
+
+    BE provides an http interface for single tablet data recovery, the 
interface is as follows:
+    
+    ```
+    curl -X POST 
"http://be_host:be_webserver_port/api/restore_tablet?tablet_id=11111\&schema_hash=12345";
+    ```
+    
+    The successful results are as follows:
+    
+    ```
+    {"status": "Success", "msg": "OK"}
+    ```
+    
+    If it fails, the corresponding failure reason will be returned. One 
possible result is as follows:
+    
+    ```
+    {"status": "Failed", "msg": "create link path failed"}
+    ```
+
+2. Script mode
+
+    `restore_tablet_tool.sh` can be used to realize the function of single 
tablet data recovery.
+    
+    ```
+    sh tools/restore_tablet_tool.sh -b "http://127.0.0.1:8040"; -t 12345 -s 
11111
+    sh tools/restore_tablet_tool.sh --backend "http://127.0.0.1:8040"; 
--tablet_id 12345 --schema_hash 11111
+    ```
+
+##### batch mode
+
+The batch recovery mode is used to realize the function of recovering multiple 
tablet data.
+
+When using, you need to put the restored tablet id and schema hash in a file 
in a comma-separated format in advance, one tablet per line.
+
+The format is as follows:
+
+```
+12345,11111
+12346,11111
+12347,11111
+```
+
+Then perform the recovery with the following command (assuming the file name 
is: `tablets.txt`):
+
+```
+sh restore_tablet_tool.sh -b "http://127.0.0.1:8040"; -f tablets.txt
+sh restore_tablet_tool.sh --backend "http://127.0.0.1:8040"; --file tablets.txt
+```
+
+### Repair missing or damaged Tablet
+
+In some very special circumstances, such as code bugs, or human misoperation, 
etc., all replicas of some tablets may be lost. In this case, the data has been 
substantially lost. However, in some scenarios, the business still hopes to 
ensure that the query will not report errors even if there is data loss, and 
reduce the perception of the user layer. At this point, we can use the blank 
Tablet to fill the missing replica to ensure that the query can be executed 
normally.
+
+**Note: This operation is only used to avoid the problem of error reporting 
due to the inability to find a queryable replica, and it is impossible to 
recover the data that has been substantially lost.**
+
+1. View Master FE log `fe.log`
+
+    If there is data loss, there will be a log similar to the following in the 
log:
+    
+    ```
+    backend [10001] invalid situation. tablet[20000] has few replica[1], 
replica num setting is [3]
+    ```
+
+    This log indicates that all replicas of tablet 20000 have been damaged or 
lost.
+    
+2. Use blank replicas to fill in missing copies
+
+    After confirming that the data cannot be recovered, you can execute the 
following command to generate blank replicas.
+    
+    ```
+    ADMIN SET FRONTEND CONFIG ("recover_with_empty_tablet" = "true");
+    ```
+
+    * Note: You can first check whether the current version supports this 
parameter through the `ADMIN SHOW FRONTEND CONFIG;` command.
+
+3. A few minutes after the setup is complete, you should see the following log 
in the Master FE log `fe.log`:
+
+    ```
+    tablet 20000 has only one replica 20001 on backend 10001 and it is lost. 
create an empty replica to recover it.
+    ```
+
+    The log indicates that the system has created a blank tablet to fill in 
the missing replica.
+    
+4. Judge whether it has been repaired successfully through query.
diff --git a/docs/en/docs/admin-manual/maint-monitor/disk-capacity.md 
b/docs/en/docs/admin-manual/maint-monitor/disk-capacity.md
index e433a1f1ba..60718ddb8c 100644
--- a/docs/en/docs/admin-manual/maint-monitor/disk-capacity.md
+++ b/docs/en/docs/admin-manual/maint-monitor/disk-capacity.md
@@ -127,7 +127,7 @@ When the disk capacity is higher than High Watermark or 
even Flood Stage, many o
     * snapshot/: Snapshot files in the snapshot directory. 
     * trash/ Trash files in the trash directory. 
 
-    **This operation will affect [Restore data from BE Recycle 
Bin](./tablet-restore-tool.md).**
+    **This operation will affect [Restore data from BE Recycle 
Bin](../data-admin/delete-recover.md).**
 
     If the BE can still be started, you can use `ADMIN CLEAN TRASH 
ON(BackendHost:BackendHeartBeatPort);` to actively clean up temporary files. 
**all trash files** and expired snapshot files will be cleaned up, **This will 
affect the operation of restoring data from the trash bin**.
 
diff --git a/docs/en/docs/admin-manual/maint-monitor/tablet-restore-tool.md 
b/docs/en/docs/admin-manual/maint-monitor/tablet-restore-tool.md
deleted file mode 100644
index a33c1dc5ca..0000000000
--- a/docs/en/docs/admin-manual/maint-monitor/tablet-restore-tool.md
+++ /dev/null
@@ -1,136 +0,0 @@
----
-{
-    "title": "Tablet Restore Tool",
-    "language": "en"
-}
----
-
-<!-- 
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-# Tablet Restore Tool
-
-## Restore data from BE Recycle Bin
-
-During the user's use of Doris, some valid tablets (including metadata and 
data) may be deleted due to some misoperations or online bugs. In order to 
prevent data loss in these abnormal situations, Doris provides a recycle bin 
mechanism to protect user data. Tablet data deleted by users will not be 
deleted directly, but will be stored in the recycle bin for a period of time. 
After a period of time, there will be a regular cleaning mechanism to delete 
expired data. The data in the recycle [...]
-
-```
-/root_path/trash/time_label/tablet_id/schema_hash/
-```
-
-* `root_path`: a data root directory corresponding to the BE node.
-* `trash`: The directory of the recycle bin.
-* `time_label`: Time label, for the uniqueness of the data directory in the 
recycle bin, while recording the data time, use the time label as a 
subdirectory.
-
-When a user finds that online data has been deleted by mistake, he needs to 
recover the deleted tablet from the recycle bin. This tablet data recovery 
function is needed.
-
-BE provides http interface and `restore_tablet_tool.sh` script to achieve this 
function, and supports single tablet operation (single mode) and batch 
operation mode (batch mode).
-
-* In single mode, data recovery of a single tablet is supported.
-* In batch mode, support batch tablet data recovery.
-
-### Operation
-
-#### single mode
-
-1. http request method
-
-    BE provides an http interface for single tablet data recovery, the 
interface is as follows:
-    
-    ```
-    curl -X POST 
"http://be_host:be_webserver_port/api/restore_tablet?tablet_id=11111\&schema_hash=12345";
-    ```
-    
-    The successful results are as follows:
-    
-    ```
-    {"status": "Success", "msg": "OK"}
-    ```
-    
-    If it fails, the corresponding failure reason will be returned. One 
possible result is as follows:
-    
-    ```
-    {"status": "Failed", "msg": "create link path failed"}
-    ```
-
-2. Script mode
-
-    `restore_tablet_tool.sh` can be used to realize the function of single 
tablet data recovery.
-    
-    ```
-    sh tools/restore_tablet_tool.sh -b "http://127.0.0.1:8040"; -t 12345 -s 
11111
-    sh tools/restore_tablet_tool.sh --backend "http://127.0.0.1:8040"; 
--tablet_id 12345 --schema_hash 11111
-    ```
-
-#### batch mode
-
-The batch recovery mode is used to realize the function of recovering multiple 
tablet data.
-
-When using, you need to put the restored tablet id and schema hash in a file 
in a comma-separated format in advance, one tablet per line.
-
-The format is as follows:
-
-```
-12345,11111
-12346,11111
-12347,11111
-```
-
-Then perform the recovery with the following command (assuming the file name 
is: `tablets.txt`):
-
-```
-sh restore_tablet_tool.sh -b "http://127.0.0.1:8040"; -f tablets.txt
-sh restore_tablet_tool.sh --backend "http://127.0.0.1:8040"; --file tablets.txt
-```
-
-## Repair missing or damaged Tablet
-
-In some very special circumstances, such as code bugs, or human misoperation, 
etc., all replicas of some tablets may be lost. In this case, the data has been 
substantially lost. However, in some scenarios, the business still hopes to 
ensure that the query will not report errors even if there is data loss, and 
reduce the perception of the user layer. At this point, we can use the blank 
Tablet to fill the missing replica to ensure that the query can be executed 
normally.
-
-**Note: This operation is only used to avoid the problem of error reporting 
due to the inability to find a queryable replica, and it is impossible to 
recover the data that has been substantially lost.**
-
-1. View Master FE log `fe.log`
-
-    If there is data loss, there will be a log similar to the following in the 
log:
-    
-    ```
-    backend [10001] invalid situation. tablet[20000] has few replica[1], 
replica num setting is [3]
-    ```
-
-    This log indicates that all replicas of tablet 20000 have been damaged or 
lost.
-    
-2. Use blank replicas to fill in missing copies
-
-    After confirming that the data cannot be recovered, you can execute the 
following command to generate blank replicas.
-    
-    ```
-    ADMIN SET FRONTEND CONFIG ("recover_with_empty_tablet" = "true");
-    ```
-
-    * Note: You can first check whether the current version supports this 
parameter through the `ADMIN SHOW FRONTEND CONFIG;` command.
-
-3. A few minutes after the setup is complete, you should see the following log 
in the Master FE log `fe.log`:
-
-    ```
-    tablet 20000 has only one replica 20001 on backend 10001 and it is lost. 
create an empty replica to recover it.
-    ```
-
-    The log indicates that the system has created a blank tablet to fill in 
the missing replica.
-    
-4. Judge whether it has been repaired successfully through query.
\ No newline at end of file
diff --git a/docs/sidebars.json b/docs/sidebars.json
index 21a991aa82..d2de428a60 100644
--- a/docs/sidebars.json
+++ b/docs/sidebars.json
@@ -1109,7 +1109,6 @@
                         "admin-manual/maint-monitor/tablet-meta-tool",
                         "admin-manual/maint-monitor/monitor-alert",
                         "admin-manual/maint-monitor/tablet-local-debug",
-                        "admin-manual/maint-monitor/tablet-restore-tool",
                         "admin-manual/maint-monitor/metadata-operation",
                         "admin-manual/maint-monitor/automatic-service-start"
                     ]
diff --git a/docs/zh-CN/docs/admin-manual/data-admin/delete-recover.md 
b/docs/zh-CN/docs/admin-manual/data-admin/delete-recover.md
index 249037eae5..dc3f5c28b9 100644
--- a/docs/zh-CN/docs/admin-manual/data-admin/delete-recover.md
+++ b/docs/zh-CN/docs/admin-manual/data-admin/delete-recover.md
@@ -26,9 +26,35 @@ under the License.
 
 # 数据删除恢复
 
-Doris为了避免误操作造成的灾难,支持对误删除的数据库/表/分区进行数据恢复,在drop table或者 drop 
database之后,Doris不会立刻对数据进行物理删除,而是在 Trash 
中保留一段时间(默认1天,可通过fe.conf中`catalog_trash_expire_second`参数配置),管理员可以通过RECOVER命令对误删除的数据进行恢复。
+数据删除恢复包含两种情况:
 
-## 开始数据恢复
+1. 用户执行命令`drop 
database/table/partition`之后,再使用命令`recover`来恢复整个数据库/表/分区的所有数据。这种修复将会把FE上的数据库/表/分区的结构,从catalog回收站里恢复过来,把它们从不可见状态,重新变回可见,并且原来的数据也恢复可见;
+2. 用户因为某些误操作或者线上bug,导致BE上部分tablet被删除,通过运维工具把这些tablet从BE回收站中抢救回来。
+
+上面两个,前者针对的是数据库/表/分区在FE上已经不可见,且数据库/表/分区的元数据尚保留在FE的catalog回收站里。而后者针对的是数据库/表/分区在FE上可见,但部分BE
 tablet数据被删除。
+
+下面分别阐述这两种恢复。
+
+## Drop 恢复
+
+Doris为了避免误操作造成的灾难,支持对误删除的数据库/表/分区进行数据恢复,在drop table或者 drop database 或者 drop 
partition之后,Doris不会立刻对数据进行物理删除,而是在FE的catalog回收站中保留一段时间(默认1天,可通过fe.conf中`catalog_trash_expire_second`参数配置),管理员可以通过RECOVER命令对误删除的数据进行恢复。
+
+**注意,如果是使用`drop force`进行删除的,则是直接删除,无法再恢复。**
+
+### 查看可恢复数据
+
+查看FE上哪些数据可恢复
+
+```sql
+SHOW CATALOG RECYCLE BIN [ WHERE NAME [ = "name" | LIKE "name_matcher"] ]
+```
+
+这里name可以是数据库/表/分区名。
+
+
+关于该命令使用的更多详细语法及最佳实践,请参阅 
[SHOW-CATALOG-RECYCLE-BIN](../../sql-manual/sql-reference/Show-Statements/SHOW-CATALOG-RECYCLE-BIN.md)
 命令手册,你也可以在 MySql 客户端命令行下输入 `help SHOW CATALOG RECYCLE BIN ` 获取更多帮助信息。
+
+### 开始数据恢复
 
 1.恢复名为 example_db 的 database
 
@@ -48,6 +74,132 @@ RECOVER TABLE example_db.example_tbl;
 RECOVER PARTITION p1 FROM example_tbl;
 ```
 
-## 更多帮助
+执行`RECOVER`命令之后,原来的数据将恢复可见。
+
+关于 RECOVER 使用的更多详细语法及最佳实践,请参阅 
[RECOVER](../../sql-manual/sql-reference/Database-Administration-Statements/RECOVER.md)
 命令手册,你也可以在 MySql 客户端命令行下输入 `help RECOVER` 获取更多帮助信息。
+
+## BE tablet 数据恢复
+
+### 从 BE 回收站中恢复数据
+
+用户在使用Doris的过程中,可能会发生因为一些误操作或者线上bug,导致一些有效的tablet被删除(包括元数据和数据)。
+
+为了防止在这些异常情况出现数据丢失,Doris提供了回收站机制,来保护用户数据。
+
+用户删除的tablet数据在BE端不会被直接删除,会被放在回收站中存储一段时间,在一段时间之后会有定时清理机制将过期的数据删除。默认情况下,在磁盘空间占用不超过81%(BE配置`config.storage_flood_stage_usage_percent`
 * 0.9 * 100%)时,BE回收站中的数据最长保留3天(见BE配置`config.trash_file_expire_time_sec`)。
+
+BE回收站中的数据包括:tablet的data文件(.dat),tablet的索引文件(.idx)和tablet的元数据文件(.hdr)。数据将会存放在如下格式的路径:
+
+```
+/root_path/trash/time_label/tablet_id/schema_hash/
+```
+
+* `root_path`:对应BE节点的某个数据根目录。
+* `trash`:回收站的目录。
+* `time_label`:时间标签,为了回收站中数据目录的唯一性,同时记录数据时间,使用时间标签作为子目录。
+
+当用户发现线上的数据被误删除,需要从回收站中恢复被删除的tablet,需要用到这个tablet数据恢复功能。
+
+BE提供http接口和 `restore_tablet_tool.sh` 脚本实现这个功能,支持单tablet操作(single 
mode)和批量操作模式(batch mode)。
+
+* 在single mode下,支持单个tablet的数据恢复。
+* 在batch mode下,支持批量tablet的数据恢复。
+
+另外,用户可以使用命令 `show trash`查看BE中的trash数据,可以使用命令`admin clean trash`来清楚BE的trash数据。
+
+#### 操作
+
+##### single mode
+
+1. http请求方式
+
+    BE中提供单个tablet数据恢复的http接口,接口如下:
+    
+    ```
+    curl -X POST 
"http://be_host:be_webserver_port/api/restore_tablet?tablet_id=11111\&schema_hash=12345";
+    ```
+    
+    成功的结果如下:
+    
+    ```
+    {"status": "Success", "msg": "OK"}
+    ```
+    
+    失败的话,会返回相应的失败原因,一种可能的结果如下:
+    
+    ```
+    {"status": "Failed", "msg": "create link path failed"}
+    ```
+
+2. 脚本方式
+
+    `restore_tablet_tool.sh` 可用来实现单tablet数据恢复的功能。
+    
+    ```
+    sh tools/restore_tablet_tool.sh -b "http://127.0.0.1:8040"; -t 12345 -s 
11111
+    sh tools/restore_tablet_tool.sh --backend "http://127.0.0.1:8040"; 
--tablet_id 12345 --schema_hash 11111
+    ```
+
+##### batch mode
+
+批量恢复模式用于实现恢复多个tablet数据的功能。
+
+使用的时候需要预先将恢复的tablet id和schema hash按照逗号分隔的格式放在一个文件中,一个tablet一行。
+
+格式如下:
+
+```
+12345,11111
+12346,11111
+12347,11111
+```
+
+然后如下的命令进行恢复(假设文件名为:`tablets.txt`):
+
+```
+sh restore_tablet_tool.sh -b "http://127.0.0.1:8040"; -f tablets.txt
+sh restore_tablet_tool.sh --backend "http://127.0.0.1:8040"; --file tablets.txt
+```
+
+### 修复缺失或损坏的 Tablet
+
+在某些极特殊情况下,如代码BUG、或人为误操作等,可能导致部分分片的全部副本都丢失。这种情况下,数据已经实质性的丢失。但是在某些场景下,业务依然希望能够在即使有数据丢失的情况下,保证查询正常不报错,降低用户层的感知程度。此时,我们可以通过使用空白Tablet填充丢失副本的功能,来保证查询能够正常执行。
+
+**注:该操作仅用于规避查询因无法找到可查询副本导致报错的问题,无法恢复已经实质性丢失的数据**
+
+1. 查看 Master FE 日志 `fe.log`
+
+    如果出现数据丢失的情况,则日志中会有类似如下日志:
+    
+    ```
+    backend [10001] invalid situation. tablet[20000] has few replica[1], 
replica num setting is [3]
+    ```
+
+    这个日志表示,Tablet 20000 的所有副本已损坏或丢失。
+    
+2. 使用空白副本填补缺失副本
+
+    当确认数据已经无法恢复后,可以通过执行以下命令,生成空白副本。
+    
+    ```
+    ADMIN SET FRONTEND CONFIG ("recover_with_empty_tablet" = "true");
+    ```
+
+    * 注:可以先通过 `ADMIN SHOW FRONTEND CONFIG;` 命令查看当前版本是否支持该参数。
+
+3. 设置完成几分钟后,应该会在 Master FE 日志 `fe.log` 中看到如下日志:
+
+    ```
+    tablet 20000 has only one replica 20001 on backend 10001 and it is lost. 
create an empty replica to recover it.
+    ```
+
+    该日志表示系统已经创建了一个空白 Tablet 用于填补缺失副本。
+    
+4. 通过查询来判断是否已经修复成功。
+
+5. 全部修复成功后,通过以下命令关闭 `recover_with_empty_tablet` 参数:
+
+    ```
+    ADMIN SET FRONTEND CONFIG ("recover_with_empty_tablet" = "false");
+    ```
 
-关于 RECOVER 使用的更多详细语法及最佳实践,请参阅 
[RECOVER](../../sql-manual/sql-reference/Database-Administration-Statements/RECOVER.md)
 命令手册,你也可以在 MySql 客户端命令行下输入 `HELP RECOVER` 获取更多帮助信息。
diff --git a/docs/zh-CN/docs/admin-manual/data-admin/restore.md 
b/docs/zh-CN/docs/admin-manual/data-admin/restore.md
index 9b8298654c..ce96ce05fe 100644
--- a/docs/zh-CN/docs/admin-manual/data-admin/restore.md
+++ b/docs/zh-CN/docs/admin-manual/data-admin/restore.md
@@ -1,6 +1,6 @@
 ---
 {
-    "title": "数据恢复",
+    "title": "数据备份恢复",
     "language": "zh-CN"
 }
 ---
@@ -24,7 +24,7 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-# 数据恢复
+# 数据备份恢复
 
 Doris 支持将当前数据以文件的形式,通过 broker 备份到远端存储系统中。之后可以通过 恢复 命令,从远端存储系统中将数据恢复到任意 Doris 
集群。通过这个功能,Doris 可以支持将数据定期的进行快照备份。也可以通过这个功能,在不同集群间进行数据迁移。
 
diff --git a/docs/zh-CN/docs/admin-manual/maint-monitor/disk-capacity.md 
b/docs/zh-CN/docs/admin-manual/maint-monitor/disk-capacity.md
index 13d1dc17ce..e995658ddc 100644
--- a/docs/zh-CN/docs/admin-manual/maint-monitor/disk-capacity.md
+++ b/docs/zh-CN/docs/admin-manual/maint-monitor/disk-capacity.md
@@ -125,7 +125,7 @@ storage_flood_stage_left_capacity_bytes 默认 1GB。
   - snapshot/: 快照目录下的快照文件。
   - trash/:回收站中的文件。
 
-  **这种操作会对 [从 BE 回收站中恢复数据](./tablet-restore-tool.md) 产生影响。**
+  **这种操作会对 [从 BE 回收站中恢复数据](../data-admin/delete-recover.md) 产生影响。**
 
   如果BE还能够启动,则可以使用`ADMIN CLEAN TRASH 
ON(BackendHost:BackendHeartBeatPort);`来主动清理临时文件,会清理 **所有** 
trash文件和过期snapshot文件,**这将影响从回收站恢复数据的操作** 。
 
diff --git a/docs/zh-CN/docs/admin-manual/maint-monitor/tablet-restore-tool.md 
b/docs/zh-CN/docs/admin-manual/maint-monitor/tablet-restore-tool.md
deleted file mode 100644
index aba46d8f4f..0000000000
--- a/docs/zh-CN/docs/admin-manual/maint-monitor/tablet-restore-tool.md
+++ /dev/null
@@ -1,142 +0,0 @@
----
-{
-    "title": "Tablet 恢复工具",
-    "language": "zh-CN"
-}
----
-
-<!-- 
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-
-# Tablet 恢复工具
-
-## 从 BE 回收站中恢复数据
-
-用户在使用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数据恢复功能。
-
-BE提供http接口和 `restore_tablet_tool.sh` 脚本实现这个功能,支持单tablet操作(single 
mode)和批量操作模式(batch mode)。
-
-* 在single mode下,支持单个tablet的数据恢复。
-* 在batch mode下,支持批量tablet的数据恢复。
-
-### 操作
-
-#### single mode
-
-1. http请求方式
-
-    BE中提供单个tablet数据恢复的http接口,接口如下:
-    
-    ```
-    curl -X POST 
"http://be_host:be_webserver_port/api/restore_tablet?tablet_id=11111\&schema_hash=12345";
-    ```
-    
-    成功的结果如下:
-    
-    ```
-    {"status": "Success", "msg": "OK"}
-    ```
-    
-    失败的话,会返回相应的失败原因,一种可能的结果如下:
-    
-    ```
-    {"status": "Failed", "msg": "create link path failed"}
-    ```
-
-2. 脚本方式
-
-    `restore_tablet_tool.sh` 可用来实现单tablet数据恢复的功能。
-    
-    ```
-    sh tools/restore_tablet_tool.sh -b "http://127.0.0.1:8040"; -t 12345 -s 
11111
-    sh tools/restore_tablet_tool.sh --backend "http://127.0.0.1:8040"; 
--tablet_id 12345 --schema_hash 11111
-    ```
-
-#### batch mode
-
-批量恢复模式用于实现恢复多个tablet数据的功能。
-
-使用的时候需要预先将恢复的tablet id和schema hash按照逗号分隔的格式放在一个文件中,一个tablet一行。
-
-格式如下:
-
-```
-12345,11111
-12346,11111
-12347,11111
-```
-
-然后如下的命令进行恢复(假设文件名为:`tablets.txt`):
-
-```
-sh restore_tablet_tool.sh -b "http://127.0.0.1:8040"; -f tablets.txt
-sh restore_tablet_tool.sh --backend "http://127.0.0.1:8040"; --file tablets.txt
-```
-
-## 修复缺失或损坏的 Tablet
-
-在某些极特殊情况下,如代码BUG、或人为误操作等,可能导致部分分片的全部副本都丢失。这种情况下,数据已经实质性的丢失。但是在某些场景下,业务依然希望能够在即使有数据丢失的情况下,保证查询正常不报错,降低用户层的感知程度。此时,我们可以通过使用空白Tablet填充丢失副本的功能,来保证查询能够正常执行。
-
-**注:该操作仅用于规避查询因无法找到可查询副本导致报错的问题,无法恢复已经实质性丢失的数据**
-
-1. 查看 Master FE 日志 `fe.log`
-
-    如果出现数据丢失的情况,则日志中会有类似如下日志:
-    
-    ```
-    backend [10001] invalid situation. tablet[20000] has few replica[1], 
replica num setting is [3]
-    ```
-
-    这个日志表示,Tablet 20000 的所有副本已损坏或丢失。
-    
-2. 使用空白副本填补缺失副本
-
-    当确认数据已经无法恢复后,可以通过执行以下命令,生成空白副本。
-    
-    ```
-    ADMIN SET FRONTEND CONFIG ("recover_with_empty_tablet" = "true");
-    ```
-
-    * 注:可以先通过 `ADMIN SHOW FRONTEND CONFIG;` 命令查看当前版本是否支持该参数。
-
-3. 设置完成几分钟后,应该会在 Master FE 日志 `fe.log` 中看到如下日志:
-
-    ```
-    tablet 20000 has only one replica 20001 on backend 10001 and it is lost. 
create an empty replica to recover it.
-    ```
-
-    该日志表示系统已经创建了一个空白 Tablet 用于填补缺失副本。
-    
-4. 通过查询来判断是否已经修复成功。
-
-5. 全部修复成功后,通过以下命令关闭 `recover_with_empty_tablet` 参数:
-
-    ```
-    ADMIN SET FRONTEND CONFIG ("recover_with_empty_tablet" = "false");
-    ```


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to