-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Doc] fix descriptions, add guide link (#54620)
(cherry picked from commit dc79ada) # Conflicts: # docs/en/cover_pages/functions_utility.mdx # docs/en/sql-reference/sql-statements/backup_restore/RECOVER.md # docs/en/sql-reference/sql-statements/data-definition/BACKUP.md # docs/en/sql-reference/sql-statements/data-definition/CANCEL_BACKUP.md # docs/en/sql-reference/sql-statements/data-definition/CANCEL_RESTORE.md # docs/en/sql-reference/sql-statements/data-definition/CREATE_REPOSITORY.md # docs/en/sql-reference/sql-statements/data-definition/DROP_REPOSITORY.md # docs/en/sql-reference/sql-statements/data-definition/RESTORE.md # docs/en/sql-reference/sql-statements/data-manipulation/SHOW_BACKUP.md # docs/en/sql-reference/sql-statements/data-manipulation/SHOW_RESTORE.md # docs/en/sql-reference/sql-statements/data-manipulation/SHOW_SNAPSHOT.md # docs/zh/sql-reference/sql-statements/backup_restore/RECOVER.md # docs/zh/sql-reference/sql-statements/data-definition/BACKUP.md # docs/zh/sql-reference/sql-statements/data-definition/CANCEL_BACKUP.md # docs/zh/sql-reference/sql-statements/data-definition/CANCEL_RESTORE.md # docs/zh/sql-reference/sql-statements/data-definition/CREATE_REPOSITORY.md # docs/zh/sql-reference/sql-statements/data-definition/DROP_REPOSITORY.md # docs/zh/sql-reference/sql-statements/data-definition/RESTORE.md # docs/zh/sql-reference/sql-statements/data-manipulation/SHOW_BACKUP.md # docs/zh/sql-reference/sql-statements/data-manipulation/SHOW_RESTORE.md
- Loading branch information
1 parent
b5721df
commit 45074f6
Showing
21 changed files
with
214 additions
and
4 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
docs/en/sql-reference/sql-statements/backup_restore/RECOVER.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
displayed_sidebar: docs | ||
--- | ||
|
||
# RECOVER | ||
|
||
Recovers a database, table, or partition that was dropped by using the DROP command. The dropped database, table, or partition can be recovered within the period specified by the FE parameter `catalog_trash_expire_second` (1 day by default). | ||
|
||
Data deleted by using [TRUNCATE TABLE](../table_bucket_part_index/TRUNCATE_TABLE.md) cannot be recovered. | ||
|
||
## Syntax | ||
|
||
1. Recover a database. | ||
|
||
```sql | ||
RECOVER DATABASE <db_name> | ||
``` | ||
|
||
2. Recover a table. | ||
|
||
```sql | ||
RECOVER TABLE [<db_name>.]<table_name> | ||
``` | ||
|
||
3. Recover a partition. | ||
|
||
```sql | ||
RECOVER PARTITION <partition_name> FROM [<db_name>.]<table_name> | ||
``` | ||
|
||
Note: | ||
|
||
1. This command can only recover metadata deleted some time ago (1 day by default). You can change the duration by adjusting the FE parameter `catalog_trash_expire_second`. | ||
2. If the metadata is deleted with identical metadata created, the previous one will not be recovered. | ||
|
||
## Examples | ||
|
||
1. Recover database `example_db`. | ||
|
||
```sql | ||
RECOVER DATABASE example_db; | ||
``` | ||
|
||
2. Recover table `example_tbl`. | ||
|
||
```sql | ||
RECOVER TABLE example_db.example_tbl; | ||
``` | ||
|
||
3. Recover partition `p1` in the `example_tbl` table. | ||
|
||
```sql | ||
RECOVER PARTITION p1 FROM example_tbl; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
docs/zh/sql-reference/sql-statements/backup_restore/RECOVER.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
displayed_sidebar: docs | ||
keywords: ['beifen'] | ||
--- | ||
|
||
# RECOVER | ||
|
||
恢复之前通过 DROP 操作删除的 database、table 或者 partition。DROP 操作后只有在指定的时间内才能通过 RECOVER 恢复数据,超过这个时间无法恢复。该时间由 FE 动态参数 `catalog_trash_expire_second` 控制,默认 1 天。 | ||
|
||
通过 [TRUNCATE TABLE](../table_bucket_part_index/TRUNCATE_TABLE.md) 命令删除的数据无法恢复。 | ||
|
||
> **注意** | ||
> | ||
> 只有拥有 default_catalog 的 CREATE DATABASE 权限才可以恢复数据库;同时需要拥有对应数据库的 CREATE TABLE 和对应表的 DROP 权限。 | ||
## 语法 | ||
|
||
### 恢复 database | ||
|
||
```sql | ||
RECOVER DATABASE <db_name> | ||
``` | ||
|
||
### 恢复 table | ||
|
||
```sql | ||
RECOVER TABLE [db_name.]table_name; | ||
``` | ||
|
||
### 恢复 partition | ||
|
||
```sql | ||
RECOVER PARTITION partition_name FROM [db_name.]table_name; | ||
``` | ||
|
||
说明: | ||
|
||
1. 该操作仅能恢复之前一段时间内删除的元信息,默认为 1 天。(可通过 `fe.conf` 中 `catalog_trash_expire_second` 参数配置。) | ||
|
||
2. 如果删除元信息后新建了同名同类型的元信息,则之前删除的元信息不能被恢复。 | ||
|
||
## 示例 | ||
|
||
1. 恢复名为 `example_db` 的 database。 | ||
|
||
```sql | ||
RECOVER DATABASE example_db; | ||
``` | ||
|
||
2. 恢复名为 `example_tbl` 的 table。 | ||
|
||
```sql | ||
RECOVER TABLE example_db.example_tbl; | ||
``` | ||
|
||
3. 恢复表 `example_tbl` 中名为 `p1` 的 partition。 | ||
|
||
```sql | ||
RECOVER PARTITION p1 FROM example_tbl; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,6 @@ displayed_sidebar: "Chinese" | |
|
||
# SHOW REPOSITORIES | ||
|
||
## 功能 | ||
|
||
查看当前已创建的仓库。 | ||
|
||
## 语法 | ||
|
Oops, something went wrong.