HugeGraph-Tools Quick Start

1 HugeGraph-Tools Overview

HugeGraph-Tools is an automated deployment, management and backup/restore component of HugeGraph.

2 Get HugeGraph-Tools

There are two ways to get HugeGraph-Tools:

  • Download the compiled tarball
  • Clone source code then compile and install

2.1 Download the compiled archive

Download the latest version of the HugeGraph-Toolchain package:

  1. wget https://downloads.apache.org/incubator/hugegraph/1.0.0/apache-hugegraph-toolchain-incubating-1.0.0.tar.gz
  2. tar zxf *hugegraph*.tar.gz

2.2 Clone source code to compile and install

Please ensure that the wget command is installed before compiling the source code

Download the latest version of the HugeGraph-Tools source package:

  1. # 1. get from github
  2. git clone https://github.com/apache/hugegraph-toolchain.git
  3. # 2. get from direct (e.g. here is 1.0.0, please choose the latest version)
  4. wget https://downloads.apache.org/incubator/hugegraph/1.0.0/apache-hugegraph-toolchain-incubating-1.0.0-src.tar.gz

Compile and generate tar package:

  1. cd hugegraph-tools
  2. mvn package -DskipTests

Generate tar package hugegraph-tools-${version}.tar.gz

3 How to use

3.1 Function overview

After decompression, enter the hugegraph-tools directory, you can use bin/hugegraph or bin/hugegraph help to view the usage information. mainly divided:

  • Graph management Type,graph-mode-set、graph-mode-get、graph-list、graph-get and graph-clear
  • Asynchronous task management Type,task-list、task-get、task-delete、task-cancel and task-clear
  • Gremlin Type,gremlin-execute and gremlin-schedule
  • Backup/Restore Type,backup、restore、migrate、schedule-backup and dump
  • Install the deployment Type,deploy、clear、start-all and stop-all
  1. Usage: hugegraph [options] [command] [command options]
3.2 [options]-Global Variable

options is a global variable of HugeGraph-Tools, which can be configured in hugegraph-tools/bin/hugegraph, including:

  • –graph,HugeGraph-Tools The name of the graph to operate on, the default value is hugegraph
  • –url,The service address of HugeGraph-Server, the default is http://127.0.0.1:8080
  • –user,When HugeGraph-Server opens authentication, pass username
  • –password,When HugeGraph-Server opens authentication, pass the user’s password
  • –timeout,Timeout when connecting to HugeGraph-Server, the default is 30s
  • –trust-store-file,The path of the certificate file, when –url uses https, the truststore file used by HugeGraph-Client, the default is empty, which means using the built-in truststore file conf/hugegraph.truststore of hugegraph-tools
  • –trust-store-password,The password of the certificate file, when –url uses https, the password of the truststore used by HugeGraph-Client, the default is empty, representing the password of the built-in truststore file of hugegraph-tools

The above global variables can also be set through environment variables. One way is to use export on the command line to set temporary environment variables, which are valid until the command line is closed

Global VariableEnvironment VariableExample
–urlHUGEGRAPH_URLexport HUGEGRAPH_URL=http://127.0.0.1:8080
–graphHUGEGRAPH_GRAPHexport HUGEGRAPH_GRAPH=hugegraph
–userHUGEGRAPH_USERNAMEexport HUGEGRAPH_USERNAME=admin
–passwordHUGEGRAPH_PASSWORDexport HUGEGRAPH_PASSWORD=test
–timeoutHUGEGRAPH_TIMEOUTexport HUGEGRAPH_TIMEOUT=30
–trust-store-fileHUGEGRAPH_TRUST_STORE_FILEexport HUGEGRAPH_TRUST_STORE_FILE=/tmp/trust-store
–trust-store-passwordHUGEGRAPH_TRUST_STORE_PASSWORDexport HUGEGRAPH_TRUST_STORE_PASSWORD=xxxx

Another way is to set the environment variable in the bin/hugegraph script:

  1. #!/bin/bash
  2. # Set environment here if needed
  3. #export HUGEGRAPH_URL=
  4. #export HUGEGRAPH_GRAPH=
  5. #export HUGEGRAPH_USERNAME=
  6. #export HUGEGRAPH_PASSWORD=
  7. #export HUGEGRAPH_TIMEOUT=
  8. #export HUGEGRAPH_TRUST_STORE_FILE=
  9. #export HUGEGRAPH_TRUST_STORE_PASSWORD=
3.3 Graph Management Type,graph-mode-set、graph-mode-get、graph-list、graph-get and graph-clear
  • graph-mode-set,set graph restore mode
    • –graph-mode or -m, required, specifies the mode to be set, legal values include [NONE, RESTORING, MERGING, LOADING]
  • graph-mode-get,get graph restore mode
  • graph-list,list all graphs in a HugeGraph-Server
  • graph-get,get a graph and its storage backend type
  • graph-clear,clear all schema and data of a graph
    • –confirm-message Or -c, required, delete confirmation information, manual input is required, double confirmation to prevent accidental deletion, “I’m sure to delete all data”, including double quotes

When you need to restore the backup graph to a new graph, you need to set the graph mode to RESTORING mode; when you need to merge the backup graph into an existing graph, you need to first set the graph mode to MERGING model.

3.4 Asynchronous task management Type,task-list、task-get and task-delete
  • task-list,List the asynchronous tasks in a graph, which can be filtered according to the status of the tasks
    • –status,Optional, specify the status of the task to view, i.e. filter tasks by status
    • –limit,Optional, specify the number of tasks to be obtained, the default is -1, which means to obtain all eligible tasks
  • task-get,Get detailed information about an asynchronous task
    • –task-id,Required, specifies the ID of the asynchronous task
  • task-delete,Delete information about an asynchronous task
    • –task-id,Required, specifies the ID of the asynchronous task
  • task-cancel,Cancel the execution of an asynchronous task
    • –task-id,ID of the asynchronous task to cancel
  • task-clear,Clean up completed asynchronous tasks
    • –force,Optional. When set, it means to clean up all asynchronous tasks. Unfinished ones are canceled first, and then all asynchronous tasks are cleared. By default, only completed asynchronous tasks are cleaned up
3.5 Gremlin Type,gremlin-execute and gremlin-schedule
  • gremlin-execute, send Gremlin statements to HugeGraph-Server to execute query or modification operations, execute synchronously, and return results after completion

    • –file or -f, specify the script file to execute, UTF-8 encoding, mutually exclusive with –script
    • –script or -s, specifies the script string to execute, mutually exclusive with –file
    • –aliases or -a, Gremlin alias settings, the format is: key1=value1,key2=value2,…
    • –bindings or -b, Gremlin binding settings, the format is: key1=value1,key2=value2,…
    • –language or -l, the language of the Gremlin script, the default is gremlin-groovy

    –file and –script are mutually exclusive, one of them must be set

  • gremlin-schedule, send Gremlin statements to HugeGraph-Server to perform query or modification operations, asynchronous execution, and return the asynchronous task id immediately after the task is submitted

    • –file or -f, specify the script file to execute, UTF-8 encoding, mutually exclusive with –script
    • –script or -s, specifies the script string to execute, mutually exclusive with –file
    • –bindings or -b, Gremlin binding settings, the format is: key1=value1,key2=value2,…
    • –language or -l, the language of the Gremlin script, the default is gremlin-groovy

    –file and –script are mutually exclusive, one of them must be set

3.6 Backup/Restore Type
  • backup, back up the schema or data in a certain graph out of the HugeGraph system, and store it on the local disk or HDFS in the form of JSON
    • –format, the backup format, optional values include [json, text], the default is json
    • –all-properties, whether to back up all properties of vertices/edges, only valid when –format is text, default false
    • –label, the type of vertices/edges to be backed up, only valid when –format is text, only valid when backing up vertices or edges
    • –properties, properties of vertices/edges to be backed up, separated by commas, only valid when –format is text, valid only when backing up vertices or edges
    • –compress, whether to compress data during backup, the default is true
    • –directory or -d, the directory to store schema or data, the default is ‘./{graphName}’ for local directory, and ‘{fs.default.name}/{graphName}’ for HDFS
    • –huge-types or -t, the data types to be backed up, separated by commas, the optional value is ‘all’ or a combination of one or more [vertex, edge, vertex_label, edge_label, property_key, index_label], ‘all’ Represents all 6 types, namely vertices, edges and all schemas
    • –log or -l, specify the log directory, the default is the current directory
    • –retry, specify the number of failed retries, the default is 3
    • –split-size or -s, specifies the size of splitting vertices or edges when backing up, the default is 1048576
    • -D, use the mode of -Dkey=value to specify dynamic parameters, and specify HDFS configuration items when backing up data to HDFS, for example: -Dfs.default.name=hdfs://localhost:9000
  • restore, restore schema or data stored in JSON format to a new graph (RESTORING mode) or merge into an existing graph (MERGING mode)

    • –directory or -d, the directory to store schema or data, the default is ‘./{graphName}’ for local directory, and ‘{fs.default.name}/{graphName}’ for HDFS
    • –clean, whether to delete the directory specified by –directory after the recovery map is completed, the default is false
    • –huge-types or -t, data types to restore, separated by commas, optional value is ‘all’ or a combination of one or more [vertex, edge, vertex_label, edge_label, property_key, index_label], ‘all’ Represents all 6 types, namely vertices, edges and all schemas
    • –log or -l, specify the log directory, the default is the current directory
    • –retry, specify the number of failed retries, the default is 3
    • -D, use the mode of -Dkey=value to specify dynamic parameters, which are used to specify HDFS configuration items when restoring graphs from HDFS, for example: -Dfs.default.name=hdfs://localhost:9000

    restore command can be used only if –format is executed as backup for json

  • migrate, migrate the currently connected graph to another HugeGraphServer

    • –target-graph, the name of the target graph, the default is hugegraph
    • –target-url, the HugeGraphServer where the target graph is located, the default is http://127.0.0.1:8081
    • –target-username, the username to access the target map
    • –target-password, the password to access the target map
    • –target-timeout, the timeout for accessing the target map
    • –target-trust-store-file, access the truststore file used by the target graph
    • –target-trust-store-password, the password to access the truststore used by the target map
    • –directory or -d, during the migration process, the directory where the schema or data of the source graph is stored. For a local directory, the default is ‘./{graphName}’; for HDFS, the default is ‘{fs.default.name}/ {graphName}’
    • –huge-types or -t, the data types to be migrated, separated by commas, the optional value is ‘all’ or a combination of one or more [vertex, edge, vertex_label, edge_label, property_key, index_label], ‘all’ Represents all 6 types, namely vertices, edges and all schemas
    • –log or -l, specify the log directory, the default is the current directory
    • –retry, specify the number of failed retries, the default is 3
    • –split-size or -s, specify the size of the vertex or edge block when backing up the source graph during the migration process, the default is 1048576
    • -D, use the mode of -Dkey=value to specify dynamic parameters, which are used to specify HDFS configuration items when the data needs to be backed up to HDFS during the migration process, for example: -Dfs.default.name=hdfs://localhost: 9000
    • –graph-mode or -m, the mode to set the target graph when restoring the source graph to the target graph, legal values include [RESTORING, MERGING]
    • –keep-local-data, whether to keep the backup of the source map generated in the process of migrating the map, the default is false, that is, the backup of the source map is not kept after the default migration map ends
  • schedule-backup, periodically back up the graph and keep a certain number of the latest backups (currently only supports local file systems)
    • –directory or -d, required, specifies the directory of the backup data
    • –backup-num, optional, specifies the number of latest backups to save, defaults to 3
    • –interval, an optional item, specifies the backup cycle, the format is the same as the Linux crontab format
  • dump, export all the vertices and edges of the entire graph, and store them in vertex vertex-edge1 vertex-edge2...JSON format by default. Users can also customize the storage format, just need to be in hugegraph-tools/src/main/java/com/baidu/hugegraph/formatter Implement a class inherited from Formatter in the directory, such as CustomFormatter, and specify this class as formatter when using it, for example bin/hugegraph dump -f CustomFormatter
    • –formatter or -f, specify the formatter to use, the default is JsonFormatter
    • –directory or -d, the directory where schema or data is stored, the default is the current directory
    • –log or -l, specify the log directory, the default is the current directory
    • –retry, specify the number of failed retries, the default is 3
    • –split-size or -s, specifies the size of splitting vertices or edges when backing up, the default is 1048576
    • -D, use the mode of -Dkey=value to specify dynamic parameters, and specify HDFS configuration items when backing up data to HDFS, for example: -Dfs.default.name=hdfs://localhost:9000
3.7 Install the deployment type
  • deploy, one-click download, install and start HugeGraph-Server and HugeGraph-Studio
    • -v, required, specifies the version number of HugeGraph-Server and HugeGraph-Studio installed, the latest is 0.9
    • -p, required, specifies the installed HugeGraph-Server and HugeGraph-Studio directories
    • -u, optional, specifies the link to download the HugeGraph-Server and HugeGraph-Studio compressed packages
  • clear, clean up HugeGraph-Server and HugeGraph-Studio directories and tarballs
    • -p, required, specifies the directory of HugeGraph-Server and HugeGraph-Studio to be cleaned
  • start-all, start HugeGraph-Server and HugeGraph-Studio with one click, and start monitoring, automatically pull up the service when the service dies
    • -v, required, specifies the version number of HugeGraph-Server and HugeGraph-Studio to be started, the latest is 0.9
    • -p, required, specifies the directory where HugeGraph-Server and HugeGraph-Studio are installed
  • stop-all, close HugeGraph-Server and HugeGraph-Studio with one click

There is an optional parameter -u in the deploy command. When provided, the specified download address will be used instead of the default download address to download the tar package, and the address will be written into the ~/hugegraph-download-url-prefix file; if no address is specified later When -u and ~/hugegraph-download-url-prefix are not specified, the tar package will be downloaded from the address specified by ~/hugegraph-download-url-prefix; if there is neither -u nor ~/hugegraph-download-url-prefix, it will be downloaded from the default download address

3.8 Specific command parameters

The specific parameters of each subcommand are as follows:

  1. Usage: hugegraph [options] [command] [command options]
  2. Options:
  3. --graph
  4. Name of graph
  5. Default: hugegraph
  6. --password
  7. Password of user
  8. --timeout
  9. Connection timeout
  10. Default: 30
  11. --trust-store-file
  12. The path of client truststore file used when https protocol is enabled
  13. --trust-store-password
  14. The password of the client truststore file used when the https protocol
  15. is enabled
  16. --url
  17. The URL of HugeGraph-Server
  18. Default: http://127.0.0.1:8080
  19. --user
  20. Name of user
  21. Commands:
  22. graph-list List all graphs
  23. Usage: graph-list
  24. graph-get Get graph info
  25. Usage: graph-get
  26. graph-clear Clear graph schema and data
  27. Usage: graph-clear [options]
  28. Options:
  29. * --confirm-message, -c
  30. Confirm message of graph clear is "I'm sure to delete all data".
  31. (Note: include "")
  32. graph-mode-set Set graph mode
  33. Usage: graph-mode-set [options]
  34. Options:
  35. * --graph-mode, -m
  36. Graph mode, include: [NONE, RESTORING, MERGING]
  37. Possible Values: [NONE, RESTORING, MERGING, LOADING]
  38. graph-mode-get Get graph mode
  39. Usage: graph-mode-get
  40. task-list List tasks
  41. Usage: task-list [options]
  42. Options:
  43. --limit
  44. Limit number, no limit if not provided
  45. Default: -1
  46. --status
  47. Status of task
  48. task-get Get task info
  49. Usage: task-get [options]
  50. Options:
  51. * --task-id
  52. Task id
  53. Default: 0
  54. task-delete Delete task
  55. Usage: task-delete [options]
  56. Options:
  57. * --task-id
  58. Task id
  59. Default: 0
  60. task-cancel Cancel task
  61. Usage: task-cancel [options]
  62. Options:
  63. * --task-id
  64. Task id
  65. Default: 0
  66. task-clear Clear completed tasks
  67. Usage: task-clear [options]
  68. Options:
  69. --force
  70. Force to clear all tasks, cancel all uncompleted tasks firstly,
  71. and delete all completed tasks
  72. Default: false
  73. gremlin-execute Execute Gremlin statements
  74. Usage: gremlin-execute [options]
  75. Options:
  76. --aliases, -a
  77. Gremlin aliases, valid format is: 'key1=value1,key2=value2...'
  78. Default: {}
  79. --bindings, -b
  80. Gremlin bindings, valid format is: 'key1=value1,key2=value2...'
  81. Default: {}
  82. --file, -f
  83. Gremlin Script file to be executed, UTF-8 encoded, exclusive to
  84. --script
  85. --language, -l
  86. Gremlin script language
  87. Default: gremlin-groovy
  88. --script, -s
  89. Gremlin script to be executed, exclusive to --file
  90. gremlin-schedule Execute Gremlin statements as asynchronous job
  91. Usage: gremlin-schedule [options]
  92. Options:
  93. --bindings, -b
  94. Gremlin bindings, valid format is: 'key1=value1,key2=value2...'
  95. Default: {}
  96. --file, -f
  97. Gremlin Script file to be executed, UTF-8 encoded, exclusive to
  98. --script
  99. --language, -l
  100. Gremlin script language
  101. Default: gremlin-groovy
  102. --script, -s
  103. Gremlin script to be executed, exclusive to --file
  104. backup Backup graph schema/data. If directory is on HDFS, use -D to
  105. set HDFS params. For exmaple:
  106. -Dfs.default.name=hdfs://localhost:9000
  107. Usage: backup [options]
  108. Options:
  109. --all-properties
  110. All properties to be backup flag
  111. Default: false
  112. --compress
  113. compress flag
  114. Default: true
  115. --directory, -d
  116. Directory of graph schema/data, default is './{graphname}' in
  117. local file system or '{fs.default.name}/{graphname}' in HDFS
  118. --format
  119. File format, valid is [json, text]
  120. Default: json
  121. --huge-types, -t
  122. Type of schema/data. Concat with ',' if more than one. 'all' means
  123. all vertices, edges and schema, in other words, 'all' equals with
  124. 'vertex,edge,vertex_label,edge_label,property_key,index_label'
  125. Default: [PROPERTY_KEY, VERTEX_LABEL, EDGE_LABEL, INDEX_LABEL, VERTEX, EDGE]
  126. --label
  127. Vertex or edge label, only valid when type is vertex or edge
  128. --log, -l
  129. Directory of log
  130. Default: ./logs
  131. --properties
  132. Vertex or edge properties to backup, only valid when type is
  133. vertex or edge
  134. Default: []
  135. --retry
  136. Retry times, default is 3
  137. Default: 3
  138. --split-size, -s
  139. Split size of shard
  140. Default: 1048576
  141. -D
  142. HDFS config parameters
  143. Syntax: -Dkey=value
  144. Default: {}
  145. schedule-backup Schedule backup task
  146. Usage: schedule-backup [options]
  147. Options:
  148. --backup-num
  149. The number of latest backups to keep
  150. Default: 3
  151. * --directory, -d
  152. The directory of backups stored
  153. --interval
  154. The interval of backup, format is: "a b c d e". 'a' means minute
  155. (0 - 59), 'b' means hour (0 - 23), 'c' means day of month (1 -
  156. 31), 'd' means month (1 - 12), 'e' means day of week (0 - 6)
  157. (Sunday=0), "*" means all
  158. Default: "0 0 * * *"
  159. dump Dump graph to files
  160. Usage: dump [options]
  161. Options:
  162. --directory, -d
  163. Directory of graph schema/data, default is './{graphname}' in
  164. local file system or '{fs.default.name}/{graphname}' in HDFS
  165. --formatter, -f
  166. Formatter to customize format of vertex/edge
  167. Default: JsonFormatter
  168. --log, -l
  169. Directory of log
  170. Default: ./logs
  171. --retry
  172. Retry times, default is 3
  173. Default: 3
  174. --split-size, -s
  175. Split size of shard
  176. Default: 1048576
  177. -D
  178. HDFS config parameters
  179. Syntax: -Dkey=value
  180. Default: {}
  181. restore Restore graph schema/data. If directory is on HDFS, use -D to
  182. set HDFS params if needed. For
  183. exmaple:-Dfs.default.name=hdfs://localhost:9000
  184. Usage: restore [options]
  185. Options:
  186. --clean
  187. Whether to remove the directory of graph data after restored
  188. Default: false
  189. --directory, -d
  190. Directory of graph schema/data, default is './{graphname}' in
  191. local file system or '{fs.default.name}/{graphname}' in HDFS
  192. --huge-types, -t
  193. Type of schema/data. Concat with ',' if more than one. 'all' means
  194. all vertices, edges and schema, in other words, 'all' equals with
  195. 'vertex,edge,vertex_label,edge_label,property_key,index_label'
  196. Default: [PROPERTY_KEY, VERTEX_LABEL, EDGE_LABEL, INDEX_LABEL, VERTEX, EDGE]
  197. --log, -l
  198. Directory of log
  199. Default: ./logs
  200. --retry
  201. Retry times, default is 3
  202. Default: 3
  203. -D
  204. HDFS config parameters
  205. Syntax: -Dkey=value
  206. Default: {}
  207. migrate Migrate graph
  208. Usage: migrate [options]
  209. Options:
  210. --directory, -d
  211. Directory of graph schema/data, default is './{graphname}' in
  212. local file system or '{fs.default.name}/{graphname}' in HDFS
  213. --graph-mode, -m
  214. Mode used when migrating to target graph, include: [RESTORING,
  215. MERGING]
  216. Default: RESTORING
  217. Possible Values: [NONE, RESTORING, MERGING, LOADING]
  218. --huge-types, -t
  219. Type of schema/data. Concat with ',' if more than one. 'all' means
  220. all vertices, edges and schema, in other words, 'all' equals with
  221. 'vertex,edge,vertex_label,edge_label,property_key,index_label'
  222. Default: [PROPERTY_KEY, VERTEX_LABEL, EDGE_LABEL, INDEX_LABEL, VERTEX, EDGE]
  223. --keep-local-data
  224. Whether to keep the local directory of graph data after restored
  225. Default: false
  226. --log, -l
  227. Directory of log
  228. Default: ./logs
  229. --retry
  230. Retry times, default is 3
  231. Default: 3
  232. --split-size, -s
  233. Split size of shard
  234. Default: 1048576
  235. --target-graph
  236. The name of target graph to migrate
  237. Default: hugegraph
  238. --target-password
  239. The password of target graph to migrate
  240. --target-timeout
  241. The timeout to connect target graph to migrate
  242. Default: 0
  243. --target-trust-store-file
  244. The trust store file of target graph to migrate
  245. --target-trust-store-password
  246. The trust store password of target graph to migrate
  247. --target-url
  248. The url of target graph to migrate
  249. Default: http://127.0.0.1:8081
  250. --target-user
  251. The username of target graph to migrate
  252. -D
  253. HDFS config parameters
  254. Syntax: -Dkey=value
  255. Default: {}
  256. deploy Install HugeGraph-Server and HugeGraph-Studio
  257. Usage: deploy [options]
  258. Options:
  259. * -p
  260. Install path of HugeGraph-Server and HugeGraph-Studio
  261. -u
  262. Download url prefix path of HugeGraph-Server and HugeGraph-Studio
  263. * -v
  264. Version of HugeGraph-Server and HugeGraph-Studio
  265. start-all Start HugeGraph-Server and HugeGraph-Studio
  266. Usage: start-all [options]
  267. Options:
  268. * -p
  269. Install path of HugeGraph-Server and HugeGraph-Studio
  270. * -v
  271. Version of HugeGraph-Server and HugeGraph-Studio
  272. clear Clear HugeGraph-Server and HugeGraph-Studio
  273. Usage: clear [options]
  274. Options:
  275. * -p
  276. Install path of HugeGraph-Server and HugeGraph-Studio
  277. stop-all Stop HugeGraph-Server and HugeGraph-Studio
  278. Usage: stop-all
  279. help Print usage
  280. Usage: help
3.9 Specific command example
1. gremlin statement
  1. # Execute gremlin synchronously
  2. ./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph gremlin-execute --script 'g.V().count()'
  3. # Execute gremlin asynchronously
  4. ./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph gremlin-schedule --script 'g.V().count()'
2. Show task status
  1. ./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph task-list
  2. ./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph task-list --limit 5
  3. ./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph task-list --status success
3. Set and show graph mode
  1. ./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph graph-mode-set -m RESTORING MERGING NONE
  2. ./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph graph-mode-set -m RESTORING
  3. ./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph graph-mode-get
  4. ./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph graph-list
4. Cleanup Graph
  1. ./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph graph-clear -c "I'm sure to delete all data"
5. Backup Graph
  1. ./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph backup -t all --directory ./backup-test
6. Periodic Backup Graph
  1. ./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph --interval */2 * * * * schedule-backup -d ./backup-0.10.2
7. Recovery Graph
  1. # set graph mode
  2. ./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph graph-mode-set -m RESTORING
  3. # recovery graph
  4. ./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph restore -t all --directory ./backup-test
  5. # restore graph mode
  6. ./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph graph-mode-set -m NONE
8. Graph Migration
  1. ./bin/hugegraph --url http://127.0.0.1:8080 --graph hugegraph migrate --target-url http://127.0.0.1:8090 --target-graph hugegraph

Last modified October 9, 2023: doc: enhance a string of problems to improve UE (#288) (69c20091)