imbajin commented on code in PR #475:
URL: https://github.com/apache/hugegraph-doc/pull/475#discussion_r3942868074
##########
content/en/docs/quickstart/toolchain/hugegraph-tools.md:
##########
@@ -196,60 +207,61 @@ Another way is to set the environment variable in the
bin/hugegraph script:
- --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
+ - --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, 'schema' represents the 4 schema
types [vertex_label, edge_label, property_key, index_label]
+ - --log or -l, specify the log directory, the default is ./logs
- --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
+ - --thread-num or -T, the number of threads to use, default is Math.min(10,
Math.max(4, CPUs / 2))
+ - --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, and it must be at least 1048576 (1M)
- -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]
+ - --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],
the default is RESTORING. The target graph is switched to this mode during the
migration and switched back to its original mode afterwards
- --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
+ - --interval, an optional item, specifies the backup cycle, the format is
the same as the Linux crontab format, the default is "0 0 * * *" (every day at
00:00)
+ > schedule-backup adds a crontab entry that runs `backup -t all` into
`{directory}/{graph}/hugegraph-backup-{yyMMddHHmm}/` and keeps only the latest
--backup-num backups. A relative --directory is resolved against the
hugegraph-tools home directory, and `{directory}/{graph}` must not exist yet
- 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
+ - --directory or -d, the directory where schema or data is stored, the
default is './{graphName}' for local directory, and
'{fs.default.name}/{graphName}' for HDFS
+ - --log or -l, specify the log directory, the default is ./logs
- --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
+ - --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, and it must be at least 1048576 (1M)
- -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
+ - --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; 'belong' requires 'user'
and 'group' to be included, 'access' requires 'group' and 'target' to be
included
+ - --directory, directory to store backup data, the default is
'./auth-backup-restore' for local directory, and
'{fs.default.name}/auth-backup-restore' for HDFS (this option has no -d short
form)
- --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
+ - --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; 'belong' requires 'user'
and 'group' to be included, 'access' requires 'group' and 'target' to be
included
+ - --directory, directory where backup data is stored, the default is
'./auth-backup-restore' for local directory, and
'{fs.default.name}/auth-backup-restore' for HDFS (this option has no -d short
form)
- --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
+ - --init-password, initial password to set when restoring users, required
when --types includes user
- -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
+ - -v, required, specifies the HugeGraph-Server and HugeGraph-Studio version
to install, must be one of the versions listed in bin/version-map.yaml (0.6,
0.7, 0.8, 0.9, 0.10), which maps it to the matching server and studio release
versions
- -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
+- clear, clean up HugeGraph-Server and HugeGraph-Studio directories and
tarballs (refuses to run while a matching server or studio process is still
alive, and prompts before each removal)
- -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
+- start-all, start HugeGraph-Server and HugeGraph-Studio with one click
+ - -v, required, specifies the installed HugeGraph-Server and
HugeGraph-Studio version to start, same values as deploy
- -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
+> deploy, start-all, clear and stop-all are handed by `bin/hugegraph` straight
to the shell scripts `bin/deploy.sh`, `bin/start-all.sh`, `bin/clear.sh` and
`bin/stop-all.sh`, so the global options and environment variables in 3.2 do
not apply to them.
+
+> 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 `https://github.com/hugegraph`
Review Comment:
⚠️ Important: This newly documented default is not a usable release source
for the versions accepted by `deploy`. `deploy.sh` combines it with
`/hugegraph/releases/download/v${SERVER_VERSION}/...`; for `-v 0.8` that
resolves to
`https://github.com/hugegraph/hugegraph/releases/download/v0.8.0/hugegraph-0.8.0.tar.gz`,
but that release is not published there. Please fix the script or document a
verified download prefix/URL before advertising this default, and mirror the
correction in the Chinese page.
--
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]