Copilot commented on code in PR #3382:
URL: https://github.com/apache/doris-website/pull/3382#discussion_r2790375253
##########
i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-statements/data-modification/backup-and-restore/BACKUP.md:
##########
@@ -8,12 +8,12 @@
## 描述
-该语句用于备份指定数据库下的数据。该命令为异步操作,提交成功后,需通过 [SHOW BACKUP](./SHOW-BACKUP.md) 命令查看进度。
+该语句用于备份指定数据库下的数据。该命令为异步操作,提交成功后,需通过 `SHOW BACKUP` 命令查看进度。
## 语法
```sql
-BACKUP SNAPSHOT [<db_name>.]<snapshot_name>
+BACKUP [GLOBAL] SNAPSHOT [<db_name>.]<snapshot_name>
TO `<repository_name>`
Review Comment:
`BACKUP [GLOBAL] ... [<db_name>.]<snapshot_name>` 表明使用 `GLOBAL` 时
`<db_name>` 可省略,但“必选参数”仍将 `<db_name>` 视为必填。建议更新参数说明,明确 GLOBAL/非 GLOBAL 两种形式的差异。
##########
i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/data-modification/backup-and-restore/RESTORE.md:
##########
@@ -128,3 +131,28 @@ PROPERTIES
);
```
+4. 从 example_repo 中恢复备份 snapshot_4 的权限、catalog 和 workload group 信息,时间版本为
"2018-05-04-18-12-18"。
+
+```sql
+RESTORE GLOBAL SNAPSHOT `snapshot_4`
+FROM `example_repo`
+EXCLUDE ( `backup_tbl` )
+PROPERTIES
+(
+ "backup_timestamp"="2018-05-04-18-12-18"
Review Comment:
示例 4 文案说会恢复权限/catalog/workload group,但 SQL 里只设置了 `backup_timestamp`,没有设置新增的
`reserve_privilege` / `reserve_catalog` / `reserve_workload_group` 属性。请补充这些
PROPERTIES,或说明 `RESTORE GLOBAL` 默认会恢复它们。
```suggestion
"backup_timestamp"="2018-05-04-18-12-18",
"reserve_privilege" = "true",
"reserve_catalog" = "true",
"reserve_workload_group" = "true"
```
##########
docs/sql-manual/sql-statements/data-modification/backup-and-restore/RESTORE.md:
##########
@@ -129,3 +132,29 @@ PROPERTIES
"backup_timestamp"="2018-05-04-18-12-18"
);
```
+
+4. Restore privileges, catalogs, and workload groups from backup snapshot_4 in
example_repo, with time version "2018-05-04-18-12-18".
+
+```sql
+RESTORE GLOBAL SNAPSHOT `snapshot_4`
+FROM `example_repo`
+EXCLUDE ( `backup_tbl` )
+PROPERTIES
+(
+ "backup_timestamp"="2018-05-04-18-12-18"
+);
Review Comment:
Example 4 claims to restore privileges/catalogs/workload groups, but the SQL
only sets `backup_timestamp` and doesn’t set any of the documented
`reserve_privilege` / `reserve_catalog` / `reserve_workload_group` properties.
Either add these properties to the example, or clarify that `RESTORE GLOBAL`
restores them by default without properties.
##########
i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-statements/data-modification/backup-and-restore/RESTORE.md:
##########
@@ -13,7 +13,7 @@
## 语法
```sql
-RESTORE SNAPSHOT [<db_name>.]<snapshot_name>
+RESTORE [GLOBAL] SNAPSHOT [<db_name>.]<snapshot_name>
FROM `<repository_name>`
Review Comment:
`RESTORE [GLOBAL] ... [<db_name>.]<snapshot_name>` 表明使用 `GLOBAL` 时
`<db_name>` 可省略,但“必选参数”仍将 `<db_name>` 视为必填。建议更新参数说明以匹配 GLOBAL 形式。
##########
versioned_docs/version-4.x/sql-manual/sql-statements/data-modification/backup-and-restore/RESTORE.md:
##########
@@ -129,3 +132,29 @@ PROPERTIES
"backup_timestamp"="2018-05-04-18-12-18"
);
```
+
+4. Restore privileges, catalogs, and workload groups from backup snapshot_4 in
example_repo, with time version "2018-05-04-18-12-18".
+
+```sql
+RESTORE GLOBAL SNAPSHOT `snapshot_4`
+FROM `example_repo`
+EXCLUDE ( `backup_tbl` )
+PROPERTIES
+(
+ "backup_timestamp"="2018-05-04-18-12-18"
Review Comment:
Example 4 says it restores privileges/catalogs/workload groups, but the SQL
only sets `backup_timestamp` and doesn’t set any of the documented
`reserve_privilege` / `reserve_catalog` / `reserve_workload_group` properties.
Please add the properties or clarify the default behavior of `RESTORE GLOBAL`.
```suggestion
"backup_timestamp"="2018-05-04-18-12-18",
"reserve_privilege" = "false",
"reserve_catalog" = "false",
"reserve_workload_group" = "false"
```
##########
i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/data-modification/backup-and-restore/BACKUP.md:
##########
@@ -8,12 +8,12 @@
## 描述
-该语句用于备份指定数据库下的数据。该命令为异步操作,提交成功后,需通过 [SHOW BACKUP](./SHOW-BACKUP.md) 命令查看进度。
+该语句用于备份指定数据库下的数据。该命令为异步操作,提交成功后,需通过 `SHOW BACKUP` 命令查看进度。
## 语法
```sql
-BACKUP SNAPSHOT [<db_name>.]<snapshot_name>
+BACKUP [GLOBAL] SNAPSHOT [<db_name>.]<snapshot_name>
TO `<repository_name>`
Review Comment:
`BACKUP [GLOBAL] ... [<db_name>.]<snapshot_name>` implies `<db_name>` can be
omitted for `GLOBAL`, but the “必选参数” section still treats `<db_name>` as
required. Please update the parameter docs to reflect the GLOBAL form.
##########
docs/sql-manual/sql-statements/data-modification/backup-and-restore/BACKUP.md:
##########
@@ -8,12 +8,12 @@
## Description
-This statement is used to back up the data under the specified database. This
command is an asynchronous operation. After the submission is successful, you
need to check the progress through the [SHOW BACKUP](./SHOW-BACKUP.md) command.
+This statement is used to back up the data under the specified database. This
command is an asynchronous operation. After submission, you can check progress
with the `SHOW BACKUP` command.
## Syntax
```sql
-BACKUP SNAPSHOT [<db_name>.]<snapshot_name>
+BACKUP [GLOBAL] SNAPSHOT [<db_name>.]<snapshot_name>
TO `<repository_name>`
Review Comment:
`BACKUP [GLOBAL] ... [<db_name>.]<snapshot_name>` makes `<db_name>` optional
when using `GLOBAL`, but the doc still treats `<db_name>` as a required
parameter. Please update the parameter description/section to clarify when
`<db_name>` must be provided (non-GLOBAL) vs omitted (GLOBAL).
##########
versioned_docs/version-4.x/sql-manual/sql-statements/data-modification/backup-and-restore/BACKUP.md:
##########
@@ -107,3 +110,18 @@ EXCLUDE (example_tbl);
BACKUP SNAPSHOT example_db.snapshot_label3
TO example_repo;
```
+
+5. Back up privileges, catalogs, and workload groups to repository
example_repo:
+
+```sql
+BACKUP GLOBAL SNAPSHOT snapshot_label5
+TO example_repo;
Review Comment:
Example 5 describes backing up privileges/catalogs/workload groups, but the
SQL shown doesn’t set `backup_privilege` / `backup_catalog` /
`backup_workload_group`. Please either add the relevant `PROPERTIES` flags, or
state that `BACKUP GLOBAL` includes these by default.
```suggestion
TO example_repo
PROPERTIES ("backup_privilege" = "true", "backup_catalog" = "true",
"backup_workload_group" = "true");
```
##########
docs/sql-manual/sql-statements/data-modification/backup-and-restore/BACKUP.md:
##########
@@ -107,3 +110,18 @@ EXCLUDE (example_tbl);
BACKUP SNAPSHOT example_db.snapshot_label3
TO example_repo;
```
+
+5. Back up privileges, catalogs, and workload groups to repository
example_repo:
+
+```sql
+BACKUP GLOBAL SNAPSHOT snapshot_label5
+TO example_repo;
Review Comment:
Example 5 says it backs up privileges/catalogs/workload groups, but the SQL
shown doesn’t set any of the documented `backup_privilege` / `backup_catalog` /
`backup_workload_group` properties. Either add the relevant `PROPERTIES` flags
to the example, or explicitly state that `BACKUP GLOBAL` backs these up by
default without properties.
```suggestion
TO example_repo
PROPERTIES ("backup_privilege" = "true", "backup_catalog" = "true",
"backup_workload_group" = "true");
```
##########
docs/sql-manual/sql-statements/data-modification/backup-and-restore/RESTORE.md:
##########
@@ -13,7 +13,7 @@ This statement is used to restore the data backed up by the
BACKUP command to th
## Syntax
```sql
-RESTORE SNAPSHOT [<db_name>.]<snapshot_name>
+RESTORE [GLOBAL] SNAPSHOT [<db_name>.]<snapshot_name>
FROM `<repository_name>`
Review Comment:
`RESTORE [GLOBAL] ... [<db_name>.]<snapshot_name>` implies `<db_name>` is
optional when using `GLOBAL`, but the doc still lists `<db_name>` under
“Required Parameters”. Please clarify the conditional requirement (required for
non-GLOBAL restore, omitted for GLOBAL restore).
##########
i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-statements/data-modification/backup-and-restore/BACKUP.md:
##########
@@ -108,3 +111,17 @@ BACKUP SNAPSHOT example_db.snapshot_label3
TO example_repo;
```
+5. 备份权限、catalog 和 workload group 信息到仓库 example_repo 中:
+
+```sql
+BACKUP GLOBAL SNAPSHOT snapshot_label5
+TO example_repo;
Review Comment:
示例 5 文案说明会“备份权限、catalog 和 workload group”,但 SQL 未设置新增的 `backup_privilege` /
`backup_catalog` / `backup_workload_group` 属性。请补充 PROPERTIES,或说明 `BACKUP
GLOBAL` 默认会包含这些内容。
```suggestion
TO example_repo
PROPERTIES ("backup_privilege" = "true", "backup_catalog" = "true",
"backup_workload_group" = "true");
```
##########
versioned_docs/version-4.x/sql-manual/sql-statements/data-modification/backup-and-restore/BACKUP.md:
##########
@@ -8,12 +8,12 @@
## Description
-This statement is used to back up the data under the specified database. This
command is an asynchronous operation. After the submission is successful, you
need to check the progress through the [SHOW BACKUP](./SHOW-BACKUP.md) command.
+This statement is used to back up the data under the specified database. This
command is an asynchronous operation. After submission, you can check progress
with the `SHOW BACKUP` command.
## Syntax
```sql
-BACKUP SNAPSHOT [<db_name>.]<snapshot_name>
+BACKUP [GLOBAL] SNAPSHOT [<db_name>.]<snapshot_name>
TO `<repository_name>`
Review Comment:
`BACKUP [GLOBAL] ... [<db_name>.]<snapshot_name>` implies `<db_name>` can be
omitted for `GLOBAL`, but `<db_name>` is still documented as a required
parameter. Please update the required/optional parameter docs to reflect the
GLOBAL form.
##########
i18n/zh-CN/docusaurus-plugin-content-docs/version-4.x/sql-manual/sql-statements/data-modification/backup-and-restore/RESTORE.md:
##########
@@ -128,3 +131,28 @@ PROPERTIES
);
```
+4. 从 example_repo 中恢复备份 snapshot_4 的权限、catalog 和 workload group 信息,时间版本为
"2018-05-04-18-12-18"。
+
+```sql
+RESTORE GLOBAL SNAPSHOT `snapshot_4`
+FROM `example_repo`
+EXCLUDE ( `backup_tbl` )
+PROPERTIES
+(
+ "backup_timestamp"="2018-05-04-18-12-18"
Review Comment:
示例 4 文案说会恢复权限/catalog/workload group,但 SQL 里只设置了 `backup_timestamp`,没有设置新增的
`reserve_privilege` / `reserve_catalog` / `reserve_workload_group` 属性。请补充这些
PROPERTIES,或说明 `RESTORE GLOBAL` 默认会恢复它们。
```suggestion
"backup_timestamp"="2018-05-04-18-12-18",
"reserve_privilege" = "true",
"reserve_catalog" = "true",
"reserve_workload_group" = "true"
```
##########
i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/data-modification/backup-and-restore/RESTORE.md:
##########
@@ -13,7 +13,7 @@
## 语法
```sql
-RESTORE SNAPSHOT [<db_name>.]<snapshot_name>
+RESTORE [GLOBAL] SNAPSHOT [<db_name>.]<snapshot_name>
FROM `<repository_name>`
Review Comment:
`RESTORE [GLOBAL] ... [<db_name>.]<snapshot_name>` implies `<db_name>` can
be omitted for `GLOBAL`, but the “必选参数” section still treats `<db_name>` as
required. Please update the parameter docs to reflect the GLOBAL form.
##########
versioned_docs/version-4.x/sql-manual/sql-statements/data-modification/backup-and-restore/RESTORE.md:
##########
@@ -13,7 +13,7 @@ This statement is used to restore the data backed up by the
BACKUP command to th
## Syntax
```sql
-RESTORE SNAPSHOT [<db_name>.]<snapshot_name>
+RESTORE [GLOBAL] SNAPSHOT [<db_name>.]<snapshot_name>
FROM `<repository_name>`
Review Comment:
`RESTORE [GLOBAL] ... [<db_name>.]<snapshot_name>` implies `<db_name>` can
be omitted for `GLOBAL`, but `<db_name>` is still documented as a required
parameter. Please update the parameter docs to reflect the GLOBAL form.
##########
i18n/zh-CN/docusaurus-plugin-content-docs/current/sql-manual/sql-statements/data-modification/backup-and-restore/BACKUP.md:
##########
@@ -108,3 +111,17 @@ BACKUP SNAPSHOT example_db.snapshot_label3
TO example_repo;
```
+5. 备份权限、catalog 和 workload group 信息到仓库 example_repo 中:
+
+```sql
+BACKUP GLOBAL SNAPSHOT snapshot_label5
+TO example_repo;
Review Comment:
示例 5 文案说明“备份权限、catalog 和 workload group”,但 SQL 未设置文档中新增的 `backup_privilege`
/ `backup_catalog` / `backup_workload_group` 属性。请在示例中补充 PROPERTIES,或明确说明
`BACKUP GLOBAL` 默认会包含这些内容。
```suggestion
TO example_repo
PROPERTIES ("backup_privilege" = "true", "backup_catalog" = "true",
"backup_workload_group" = "true");
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]