Skip to content

Version 1.7 of the documentation is no longer actively maintained. The site that you are currently viewing is an archived snapshot. For up-to-date documentation, see the latest version.

HugeGraph-Tools Quick Start

1 HugeGraph-Tools Overview

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

Testing Guide: For running HugeGraph-Tools tests locally, please refer to HugeGraph Toolchain Local Testing Guide

2 Get HugeGraph-Tools

HugeGraph-Tools is included in the Toolchain distribution. You can download the distribution or build it from source.

  • 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:

1export VERSION=1.7.0
2export ARCHIVE="apache-hugegraph-toolchain-incubating-${VERSION}"
3wget "https://downloads.apache.org/hugegraph/${VERSION}/${ARCHIVE}.tar.gz"
4tar zxf "${ARCHIVE}.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
2git clone https://github.com/apache/hugegraph-toolchain.git
3
4# 2. Download a released source package
5export VERSION=1.7.0
6export ARCHIVE="apache-hugegraph-toolchain-incubating-${VERSION}"
7wget "https://downloads.apache.org/hugegraph/${VERSION}/${ARCHIVE}-src.tar.gz"

Compile and generate tar package:

1cd hugegraph-toolchain
2mvn package -pl hugegraph-tools -am -DskipTests -ntp

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, graph-clear, graph-create, graph-clone and graph-drop
  • 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
  • Authentication data backup/restore type, auth-backup and auth-restore
  • Install deployment type, deploy, clear, start-all and stop-all
1Usage: 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
  • –protocol, connection protocol, either http or https; the default is http
  • –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
 3# Set environment here if needed
 4#export HUGEGRAPH_URL=
 5#export HUGEGRAPH_GRAPH=
 6#export HUGEGRAPH_USERNAME=
 7#export HUGEGRAPH_PASSWORD=
 8#export HUGEGRAPH_TIMEOUT=
 9#export HUGEGRAPH_TRUST_STORE_FILE=
10#export HUGEGRAPH_TRUST_STORE_PASSWORD=
3.3 Graph Management Type, graph-mode-set, graph-mode-get, graph-list, graph-get, graph-clear, graph-create, graph-clone and graph-drop
  • 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
  • graph-create, create a new graph with configuration file
    • –name or -n, optional, the name of the new graph, default is hugegraph
    • –file or -f, required, the path to the graph configuration file
  • graph-clone, clone an existing graph
    • –name or -n, optional, the name of the cloned graph, default is hugegraph
    • –clone-graph-name, optional, the name of the source graph to clone from, default is hugegraph
  • graph-drop, drop a graph (different from graph-clear, this completely removes the graph)
    • –confirm-message or -c, required, confirmation message “I’m sure to drop the graph”, 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

⚠️ SEC Reminder: The execution of Gremlin depends on the actual logic of the statements, which may involve scenarios such as large-scale data modification and high-risk system calls with potential implicit hazards. Please use this tool only in secure and trusted network environments. It is imperative to configure and secure HugeGraph-Server with the Authentication System (Auth) and an IP Whitelist to restrict execution requests on the server side. Never hand over the tool or expose the execution entry to unauthorized personnel.

  • 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
    • –thread-num or -T, the number of threads to use, default is Math.min(10, Math.max(4, CPUs / 2))
    • –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
    • –thread-num or -T, the number of threads to use, default is Math.min(10, Math.max(4, CPUs / 2))
    • -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-user, the username used to access the target graph
    • –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 vertices and edges in the graph, using the vertex vertex-edge1 vertex-edge2... JSON format by default. To customize the format, implement a Formatter subclass such as CustomFormatter under hugegraph-tools/src/main/java/org/apache/hugegraph/formatter, then select it when running the command: 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 Authentication data backup/restore type
  • auth-backup, backup authentication data to a specified directory
    • –types or -t, types of authentication data to back up, separated by commas, optional value is ‘all’ or a combination of one or more [user, group, target, belong, access], ‘all’ represents all 5 types
    • –directory or -d, directory to store backup data, defaults to 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
    • –thread-num or -T, the number of threads to use, default is Math.min(10, Math.max(4, CPUs / 2))
    • -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
  • auth-restore, restore authentication data from a specified directory
    • –types or -t, types of authentication data to restore, separated by commas, optional value is ‘all’ or a combination of one or more [user, group, target, belong, access], ‘all’ represents all 5 types
    • –directory or -d, directory where backup data is stored, defaults to 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
    • –thread-num or -T, the number of threads to use, default is Math.min(10, Math.max(4, CPUs / 2))
    • –strategy, conflict handling strategy, optional values are [stop, ignore], default is stop. stop means stop restoring when encountering conflicts, ignore means ignore conflicts and continue restoring
    • –init-password, initial password to set when restoring users, required when restoring user data
    • -D, use the mode of -Dkey=value to specify dynamic parameters, which are used to specify HDFS configuration items when restoring data from HDFS, for example: -Dfs.default.name=hdfs://localhost:9000
3.8 Install the deployment type
  • deploy, one-click download, install and start HugeGraph-Server and HugeGraph-Studio
    • -v, required, specifies the HugeGraph-Server and HugeGraph-Studio version to install
    • -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 installed HugeGraph-Server and HugeGraph-Studio version to start
    • -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.9 Specific command parameters

The specific parameters of each subcommand are as follows:

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