GraphDB Command Line Tools¶
What’s in this document?
The GraphDB distribution includes a number of command line tools located in the /bin
directory. Their file extensions are .sh
or empty for Linux/Unix, and .cmd
for Windows. They are described below in more detail.
console¶
This is an interactive console based on the RDF4J console.
Usage: start-console [OPTION] [repositoryID]
.
Use --help to see the available options, which are:
Option |
Description |
---|---|
-c,--cautious |
Always answer no to (suppressed) confirmation prompts |
-d,--dataDir <arg> |
Sesame data directory to ‘connect’ to |
-e,--echo |
Echoes input back to stdout, useful for logging script sessions |
-f,--force |
Always answer yes to (suppressed) confirmation prompts |
-h,--help |
Print this help |
-q,--quiet |
Suppresses prompts, useful for scripting |
-s,--serverURL <arg> |
URL of Sesame server to connect to, e.g., |
-v,--version |
Print version information |
-x,--exitOnError |
Immediately exit the console on the first error |
convert-repo¶
The convert-repo
tool is used converting the repository configuration from one GraphDB edition to another.
Usage: convert-repo -t <type> <data-dir>
.
Use --help to see the available options, which are:
Option |
Description |
---|---|
<type> |
The desired repository type, one of ‘free’, ‘se’, or ‘ee-worker’ |
<data-dir> |
The data directory of the repository, e.g., |
generate-report¶
This tool is used to generate a zip with report about a GraphDB server. On startup, graphdb -p specifies a PID file to which to write the process ID, which is needed by this tool.
Usage: <graphdb-pid> [<output-file>]
.
The available options are:
Option |
Description |
---|---|
<graphdb-pid> |
(Required) The process ID of a running GraphDB instance. |
<output-file> |
(Optional) The path of the file where the report should be saved. If this option is missing, the report will be saved in a file called |
graphdb¶
The graphdb
command line tool starts the database. See more about its command line options here.
ibrtool¶
The tool is used for incremental backup rebuild.
Use --help to see the available options, which are:
Option |
Description |
---|---|
ibrtool -l[ist] |
List all incremental backups that can be rebuilt for the master nodes located in the -Dgraphdb.home.data folder |
ibrtool -m[aster] <masterid> <incremental backup name> |
Rebuild the incremental backups for the master |
ibrtool <source folder> <target folder> |
Rebuild incremental backups based on locations supplied as arguments |
loadrdf¶
The loadrdf
tool is used for offline loading of datasets. See more about its command line options here.
ontorefine-cli¶
The ontorefine-cli
tool can be used for most of the main functionalities of the OntoRefine UI in the Workbench. Through it, you can create/export/delete OntoRefine projects, as well as apply and extract transformations made to them and reconcile data against other databases. See more about it here.
preload¶
The preload
tool is used for converting RDF files into GraphDB indexes on a very low level. See more about its command line options here.
rdfvalidator¶
Used for validating RDF files.
Usage: rdfvalidator <input-folder-or-file-with-rdf-files>
.
reification-convert¶
This tool converts standard RDF reification to RDF-star. The output file must be an RDF-star format.
Usage: reification-convert [--relaxed] <input-file1> [<input-file2> ...] <output-file>
.
Available options:
Option |
Description |
---|---|
--relaxed |
Enables relaxed mode where |
rule-compiler¶
Usage: rule-compiler <rules.pie> <java-class-name> <output-class-file> [<partial>]
.
Available options:
Option |
Description |
---|---|
<rules.pie> |
The name of the rule |
<java-class-name> |
The name of the Java class |
<output-class-file> |
The output file name |
[<partial>] |
(Optional) |
storage-tool¶
The storage-tool
is used for scanning and repairing a GraphDB repository. See more about its command line options here.