morrySnow commented on code in PR #1906:
URL: https://github.com/apache/doris-website/pull/1906#discussion_r1925201070


##########
docs/sql-manual/sql-statements/data-modification/backup-and-restore/BACKUP.md:
##########
@@ -28,30 +28,64 @@ under the License.
 
 ## 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 command. Only backing up 
tables of type OLAP is supported.
+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. 
 
- Only root or superuser users can create repositories.
-
-grammar:
+## Syntax
 
 ```sql
-BACKUP SNAPSHOT [db_name].{snapshot_name}
-TO `repository_name`
-[ON|EXCLUDE] (
-    `table_name` [PARTITION (`p1`, ...)],
-    ...
-)
-PROPERTIES ("key"="value", ...);
+BACKUP SNAPSHOT <db_name>.{<snapshot_name>}
+TO `<repository_name>`
+[ON|EXCLUDE] 
+    ( <table_name> [ PARTITION ( <partition_name> [, ...] ) ]
+    [, ...] ) ]
+
+[PROPERTIES ("key" = "value" [,...])];
 ```
 
-illustrate:
+## Required Parameters
+
+`<db_name>`

Review Comment:
   1. 需要加粗
   2. 需要序号
   ```suggestion
   ** 1. `<db_name>`**
   ```



##########
docs/sql-manual/sql-statements/data-modification/backup-and-restore/BACKUP.md:
##########
@@ -28,30 +28,64 @@ under the License.
 
 ## 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 command. Only backing up 
tables of type OLAP is supported.
+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. 
 
- Only root or superuser users can create repositories.
-
-grammar:
+## Syntax
 
 ```sql
-BACKUP SNAPSHOT [db_name].{snapshot_name}
-TO `repository_name`
-[ON|EXCLUDE] (
-    `table_name` [PARTITION (`p1`, ...)],
-    ...
-)
-PROPERTIES ("key"="value", ...);
+BACKUP SNAPSHOT <db_name>.{<snapshot_name>}
+TO `<repository_name>`
+[ON|EXCLUDE] 

Review Comment:
   这个方括号,应该是花括号?然后 ON 后面都是可选的?所以在 ON 前面应该有个方括号?
   ```suggestion
   [ { ON | EXCLUDE }
   ```



##########
docs/sql-manual/sql-statements/data-modification/backup-and-restore/BACKUP.md:
##########
@@ -28,30 +28,64 @@ under the License.
 
 ## 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 command. Only backing up 
tables of type OLAP is supported.
+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. 
 
- Only root or superuser users can create repositories.
-
-grammar:
+## Syntax
 
 ```sql
-BACKUP SNAPSHOT [db_name].{snapshot_name}
-TO `repository_name`
-[ON|EXCLUDE] (
-    `table_name` [PARTITION (`p1`, ...)],
-    ...
-)
-PROPERTIES ("key"="value", ...);
+BACKUP SNAPSHOT <db_name>.{<snapshot_name>}
+TO `<repository_name>`
+[ON|EXCLUDE] 
+    ( <table_name> [ PARTITION ( <partition_name> [, ...] ) ]
+    [, ...] ) ]
+
+[PROPERTIES ("key" = "value" [,...])];
 ```
 
-illustrate:
+## Required Parameters
+
+`<db_name>`
+
+The name of the database to which the data to be backed up belongs.
+
+`<snapshot_name>`
+
+Specify the data snapshot name. The snapshot name cannot be repeated and is 
globally unique.
+
+`<repository_name>`
+
+Warehouse name. You can create a repository via [CREATE 
REPOSITORY](./CREATE-REPOSITORY.md).
+
+## Optional Parameters
+
+`<table_name>`
+
+The name of the table to be backed up. If not specified, the entire database 
will be backed up.
 
-- There can only be one executing BACKUP or RESTORE task under the same 
database.
 - The ON clause identifies the tables and partitions that need to be backed 
up. If no partition is specified, all partitions of the table are backed up by 
default
 - Tables and partitions that do not require backup are identified in the 
EXCLUDE clause. Back up all partition data for all tables in this database 
except the specified table or partition.
-- PROPERTIES currently supports the following properties:
-  - "type" = "full": indicates that this is a full update (default)
-  - "timeout" = "3600": The task timeout period, the default is one day. in 
seconds.
+
+`<partition_name>`
+
+The name of the partition to be backed up. If not specified, all partitions of 
the corresponding table will be backed up.
+
+`<PROPERTIES>`

Review Comment:
   ```suggestion
   `[ PROPERTIES ( "<key>" = "<value>" [ , ... ] ) ]`
   ```



##########
docs/sql-manual/sql-statements/data-modification/backup-and-restore/RESTORE.md:
##########
@@ -30,40 +30,73 @@ under the License.
 
 ## Description
 
-This statement is used to restore the data backed up by the BACKUP command to 
the specified database. This command is an asynchronous operation. After the 
submission is successful, you need to check the progress through the SHOW 
RESTORE command. Restoring tables of type OLAP is only supported.
+This statement is used to restore the data backed up by the BACKUP command to 
the specified database. This command is an asynchronous operation. After the 
submission is successful, you need to check the progress through the [SHOW 
RESTORE](./SHOW-RESTORE.md) command.
 
-grammar:
+## Syntax
 
 ```sql
-RESTORE SNAPSHOT [db_name].{snapshot_name}
-FROM `repository_name`
+RESTORE SNAPSHOT [<db_name>].{<snapshot_name>}

Review Comment:
   看起来和 backup 语法类似的问题



##########
docs/sql-manual/sql-statements/data-modification/backup-and-restore/SHOW-RESTORE.md:
##########
@@ -29,57 +29,50 @@ under the License.
 
 This statement is used to view RESTORE tasks
 
-grammar:
+## Syntax
 
 ```SQL
-SHOW [BRIEF] RESTORE [FROM DB_NAME]
+SHOW [BRIEF] RESTORE [FROM <db_name>]
 ```
 
-illustrate:
-        1. Only the most recent RESTORE task is saved in Doris.
-                2. The meaning of each column is as follows:
-            JobId: Unique job id
-            Label: The name of the backup to restore
-            Timestamp: The time version of the backup to restore
-            DbName: belongs to the database
-            State: current stage
-                PENDING: The initial state after submitting the job
-                SNAPSHOTING: Executing snapshot
-                DOWNLOAD: The snapshot is complete, ready to download the 
snapshot in the repository
-                DOWNLOADING: Snapshot downloading
-                COMMIT: Snapshot download is complete, ready to take effect
-                COMMITING: in effect
-                FINISHED: The job was successful
-                CANCELLED: Job failed
-            AllowLoad: Whether to allow import when restoring (currently not 
supported)
-            ReplicationNum: Specifies the number of replicas to restore
-            RestoreJobs: Tables and partitions to restore
-            CreateTime: task submission time
-            MetaPreparedTime: Metadata preparation completion time
-            SnapshotFinishedTime: Snapshot completion time
-            DownloadFinishedTime: Snapshot download completion time
-            FinishedTime: Job finish time
-            UnfinishedTasks: Displays unfinished subtask ids during 
SNAPSHOTING, DOWNLOADING and COMMITING stages
-            Status: If the job fails, display the failure message
-            Timeout: Job timeout, in seconds
-
-
-
-        2. brief: only show key information of RESTORE tasks, columns 
RestoreObjs, Progress, TaskErrMsg will not show
-
-
+## Parameters

Review Comment:
   注意,语法章节,需要区分必选参数(Required Parameters)和可选参数(Optional Parameters),分成两个小节



##########
docs/sql-manual/sql-statements/data-modification/backup-and-restore/CANCEL-BACKUP.md:
##########
@@ -24,28 +24,26 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-
-
 ## Description
 
 This statement is used to cancel an ongoing BACKUP task.
 
-grammar:
+## Syntax
 
 ```sql
-CANCEL BACKUP FROM db_name;
+CANCEL BACKUP FROM <db_name>;
 ```
 
+## Parameters
+
+`<db_name>`
+
+The name of the database to which the backup task belongs.
+

Review Comment:
   这个语句不需要权限嘛?



##########
docs/sql-manual/sql-statements/data-modification/backup-and-restore/CANCEL-RESTORE.md:
##########
@@ -30,13 +30,19 @@ under the License.
 
 This statement is used to cancel an ongoing RESTORE task.
 
-grammar:
+## Syntax
 
 ```sql
-CANCEL RESTORE FROM db_name;
+CANCEL RESTORE FROM <db_name>;

Review Comment:
   这个语句不需要权限嘛?



##########
docs/sql-manual/sql-statements/data-modification/backup-and-restore/BACKUP.md:
##########
@@ -28,30 +28,64 @@ under the License.
 
 ## 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 command. Only backing up 
tables of type OLAP is supported.
+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. 
 
- Only root or superuser users can create repositories.
-
-grammar:
+## Syntax
 
 ```sql
-BACKUP SNAPSHOT [db_name].{snapshot_name}
-TO `repository_name`
-[ON|EXCLUDE] (
-    `table_name` [PARTITION (`p1`, ...)],
-    ...
-)
-PROPERTIES ("key"="value", ...);
+BACKUP SNAPSHOT <db_name>.{<snapshot_name>}

Review Comment:
   这个花括号,应该是方括号?
   ```suggestion
   BACKUP SNAPSHOT <db_name>[.<snapshot_name>]
   ```



##########
docs/sql-manual/sql-statements/data-modification/backup-and-restore/SHOW-RESTORE.md:
##########
@@ -29,57 +29,50 @@ under the License.
 
 This statement is used to view RESTORE tasks
 
-grammar:
+## Syntax
 
 ```SQL
-SHOW [BRIEF] RESTORE [FROM DB_NAME]
+SHOW [BRIEF] RESTORE [FROM <db_name>]
 ```
 
-illustrate:
-        1. Only the most recent RESTORE task is saved in Doris.
-                2. The meaning of each column is as follows:
-            JobId: Unique job id
-            Label: The name of the backup to restore
-            Timestamp: The time version of the backup to restore
-            DbName: belongs to the database
-            State: current stage
-                PENDING: The initial state after submitting the job
-                SNAPSHOTING: Executing snapshot
-                DOWNLOAD: The snapshot is complete, ready to download the 
snapshot in the repository
-                DOWNLOADING: Snapshot downloading
-                COMMIT: Snapshot download is complete, ready to take effect
-                COMMITING: in effect
-                FINISHED: The job was successful
-                CANCELLED: Job failed
-            AllowLoad: Whether to allow import when restoring (currently not 
supported)
-            ReplicationNum: Specifies the number of replicas to restore
-            RestoreJobs: Tables and partitions to restore
-            CreateTime: task submission time
-            MetaPreparedTime: Metadata preparation completion time
-            SnapshotFinishedTime: Snapshot completion time
-            DownloadFinishedTime: Snapshot download completion time
-            FinishedTime: Job finish time
-            UnfinishedTasks: Displays unfinished subtask ids during 
SNAPSHOTING, DOWNLOADING and COMMITING stages
-            Status: If the job fails, display the failure message
-            Timeout: Job timeout, in seconds
-
-
-
-        2. brief: only show key information of RESTORE tasks, columns 
RestoreObjs, Progress, TaskErrMsg will not show
-
-
+## Parameters

Review Comment:
   需要介绍 [BRIEF]



##########
docs/sql-manual/sql-statements/data-modification/backup-and-restore/BACKUP.md:
##########
@@ -28,30 +28,64 @@ under the License.
 
 ## 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 command. Only backing up 
tables of type OLAP is supported.
+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. 
 
- Only root or superuser users can create repositories.
-
-grammar:
+## Syntax
 
 ```sql
-BACKUP SNAPSHOT [db_name].{snapshot_name}
-TO `repository_name`
-[ON|EXCLUDE] (
-    `table_name` [PARTITION (`p1`, ...)],
-    ...
-)
-PROPERTIES ("key"="value", ...);
+BACKUP SNAPSHOT <db_name>.{<snapshot_name>}
+TO `<repository_name>`
+[ON|EXCLUDE] 
+    ( <table_name> [ PARTITION ( <partition_name> [, ...] ) ]
+    [, ...] ) ]
+
+[PROPERTIES ("key" = "value" [,...])];

Review Comment:
   ```suggestion
   [ PROPERTIES ( "<key>" = "<value>" [ , ... ] )]];
   ```



##########
docs/sql-manual/sql-statements/data-modification/backup-and-restore/RESTORE.md:
##########
@@ -30,40 +30,73 @@ under the License.
 
 ## Description
 
-This statement is used to restore the data backed up by the BACKUP command to 
the specified database. This command is an asynchronous operation. After the 
submission is successful, you need to check the progress through the SHOW 
RESTORE command. Restoring tables of type OLAP is only supported.
+This statement is used to restore the data backed up by the BACKUP command to 
the specified database. This command is an asynchronous operation. After the 
submission is successful, you need to check the progress through the [SHOW 
RESTORE](./SHOW-RESTORE.md) command.
 
-grammar:
+## Syntax
 
 ```sql
-RESTORE SNAPSHOT [db_name].{snapshot_name}
-FROM `repository_name`
+RESTORE SNAPSHOT [<db_name>].{<snapshot_name>}
+FROM `<repository_name>`
 [ON|EXCLUDE] (
-    `table_name` [PARTITION (`p1`, ...)] [AS `tbl_alias`],
-    ...
+    `<table_name>` [PARTITION (`<partition_name>`, ...)] [AS `<table_alias>`]
+    [, ...] ) ]
 )
-PROPERTIES ("key"="value", ...);
+[PROPERTIES ("key" = "value" [,...])];
 ```
 
-illustrate:
+## Parameters
+
+`<db_name>`

Review Comment:
   参数列表存在和 backup 类似的问题



##########
docs/sql-manual/sql-statements/data-modification/backup-and-restore/SHOW-SNAPSHOT.md:
##########
@@ -29,47 +29,53 @@ under the License.
 
 This statement is used to view backups that already exist in the repository.
 
-grammar:
+## Syntax
 
 ```sql
-SHOW SNAPSHOT ON `repo_name`
-[WHERE SNAPSHOT = "snapshot" [AND TIMESTAMP = "backup_timestamp"]];
+SHOW SNAPSHOT ON `<repo_name>`
+[WHERE SNAPSHOT = "<snapshot_name>" [AND TIMESTAMP = "<backup_timestamp>"]];
 ```
 
-illustrate:
+## Parameters
 
-1. The meanings of the columns are as follows:
-              Snapshot: The name of the backup
-              Timestamp: corresponds to the time version of the backup
-              Status: If the backup is normal, it will display OK, otherwise 
it will display an error message
-2. If TIMESTAMP is specified, the following additional information is 
displayed:
-                            Database: The name of the database to which the 
backup data originally belonged
-                            Details: In the form of Json, the data directory 
and file structure of the entire backup are displayed
+`<repo_name>`
 
-## Example
+Back up the selected repository name.
 
-1. View the existing backups in the repository example_repo
+`<snapshot_name>`
 
-   ```sql
-   SHOW SNAPSHOT ON example_repo;
-   ```
+Backup name.
 
-2. View only the backup named backup1 in the repository example_repo:
+`<backup_timestamp>`
 
-   ```sql
-   SHOW SNAPSHOT ON example_repo WHERE SNAPSHOT = "backup1";
-   ```
+Backup timestamp.
 
-3. View the details of the backup named backup1 in the warehouse example_repo 
with the time version "2018-05-05-15-34-26":
+## Return Value
 
-   ```sql
-   SHOW SNAPSHOT ON example_repo
-   WHERE SNAPSHOT = "backup1" AND TIMESTAMP = "2018-05-05-15-34-26";
-   ```
+| Column | Note |

Review Comment:
   ```suggestion
   | Column | Description |
   ```



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to