Improve backup/restore doc (#36)


Change-Id: Ia25a28e93fb1f9ac20dbba9f9370a5b7060ce579
diff --git a/clients/restful-api/graphs.md b/clients/restful-api/graphs.md
index c7c8fa9..5629164 100644
--- a/clients/restful-api/graphs.md
+++ b/clients/restful-api/graphs.md
@@ -135,10 +135,6 @@
 
 #### 5.3.2 设置某个图的模式. **该操作需要管理员权限**
 
-##### Params
-
-- token: 默认为`162f7848-0b6d-4faf-b557-3a0797869c55`
-
 ##### Method & Url
 
 ```
diff --git a/clients/restful-api/rebuild.md b/clients/restful-api/rebuild.md
index 88c9ace..8d70899 100644
--- a/clients/restful-api/rebuild.md
+++ b/clients/restful-api/rebuild.md
@@ -26,7 +26,7 @@
 
 > 可以通过`GET http://localhost:8080/graphs/hugegraph/tasks/1`(其中"1"是task_id)来查询异步任务的执行状态,更多[异步任务RESTful API](task.md)
 
-#### 6.2.2 重建VertexLabel索引
+#### 6.2.2 VertexLabel对应的全部索引重建
 
 ##### Method & Url
 
@@ -52,7 +52,7 @@
 
 > 可以通过`GET http://localhost:8080/graphs/hugegraph/tasks/2`(其中"2"是task_id)来查询异步任务的执行状态,更多[异步任务RESTful API](task.md)
 
-#### 6.2.3 重建EdgeLabel索引
+#### 6.2.3 EdgeLabel对应的全部索引重建
 
 ##### Method & Url
 
diff --git a/guides/backup-restore.md b/guides/backup-restore.md
index 54aa5cd..74f0658 100644
--- a/guides/backup-restore.md
+++ b/guides/backup-restore.md
@@ -18,37 +18,9 @@
 - Merging 模式,将 Backup 导出的元数据和图数据导入到另一个已经存在元数据或者图数据的图中,过程中元数据的 ID 可能发生改变,顶点和边的 ID 也会发生相应变化。
     - 可用于合并图
 
-## API
-
-#### Backup
-
-Backup 使用元数据和图数据的相应的Get RESTful API 导出,并未增加新的 API。
-
-#### Restore
-
-Restore 存在两种不同的模式: Restoring 和 Merging。另外,还有非 Restore 模式,区别如下:
-
-- None 模式,元数据和图数据的写入属于正常状态,可参见功能说明。特别的:
-    - 元数据(schema)创建时不允许指定 ID
-    - 图数据(vertex)在 id strategy 为 Automatic 时,不允许指定 ID
-- Restoring 模式,恢复到一个新图中,特别的:
-    - 元数据(schema)创建时允许指定 ID
-    - 图数据(vertex)在 id strategy 为 Automatic 时,允许指定 ID
-- Merging 模式,合并到一个已存在元数据和图数据的图中,特别的:
-    - 元数据(schema)创建时不允许指定 ID
-    - 图数据(vertex)在 id strategy 为 Automatic 时,允许指定 ID
-
-正常情况下,图模式为 None,当需要 Restore 图时,需要根据需要临时修改图模式为 Restoring 模式或者 Merging 模式,并在完成 Restore 时,恢复图模式为 None。
-
-设置图模式的 RESTful API 如下:
-
-```
-http://localhost:8080/graphs/hugegraph/mode
-```
-
 ## 使用方法
 
-可以使用hugegraph-tools进行图的备份和恢复。
+可以使用[hugegraph-tools](/quickstart/hugegraph-tools.md)进行图的备份和恢复。
 
 #### Backup
 
@@ -95,3 +67,83 @@
 #### 帮助
 
 备份和恢复命令的详细使用方式可以参考[hugegraph-tools文档](/quickstart/hugegraph-tools.md)。
+
+## Backup/Restore使用和实现的API说明
+
+#### Backup
+
+Backup 使用`元数据`和`图数据`的相应的 list(GET) API 导出,并未增加新的 API。
+
+#### Restore
+
+Restore 使用`元数据`和`图数据`的相应的 create(POST) API 导入,并未增加新的 API。
+
+Restore 时存在两种不同的模式: Restoring 和 Merging,另外,还有常规模式 NONE(默认),区别如下:
+
+- None 模式,元数据和图数据的写入属于正常状态,可参见功能说明。特别的:
+    - 元数据(schema)创建时不允许指定 ID
+    - 图数据(vertex)在 id strategy 为 Automatic 时,不允许指定 ID
+- Restoring 模式,恢复到一个新图中,特别的:
+    - 元数据(schema)创建时允许指定 ID
+    - 图数据(vertex)在 id strategy 为 Automatic 时,允许指定 ID
+- Merging 模式,合并到一个已存在元数据和图数据的图中,特别的:
+    - 元数据(schema)创建时不允许指定 ID
+    - 图数据(vertex)在 id strategy 为 Automatic 时,允许指定 ID
+
+正常情况下,图模式为 None,当需要 Restore 图时,需要根据需要临时修改图模式为 Restoring 模式或者 Merging 模式,并在完成 Restore 时,恢复图模式为 None。
+
+实现的设置图模式的 RESTful API 如下:
+
+##### 查看某个图的模式. **该操作需要管理员权限**
+
+###### Method & Url
+
+```
+GET http://localhost:8080/graphs/{graph}/mode
+```
+
+###### Response Status
+
+```json
+200
+```
+
+###### Response Body
+
+```json
+{
+    "mode": "NONE"
+}
+```
+
+> 合法的图模式包括:NONE,RESTORING,MERGING
+
+##### 设置某个图的模式. **该操作需要管理员权限**
+
+###### Method & Url
+
+```
+PUT http://localhost:8080/graphs/{graph}/mode
+```
+
+###### Request Body
+
+```
+"RESTORING"
+```
+
+> 合法的图模式包括:NONE,RESTORING,MERGING
+
+###### Response Status
+
+```json
+200
+```
+
+###### Response Body
+
+```json
+{
+    "mode": "RESTORING"
+}
+```