GraphDB Command Line Tools

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: 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., http://localhost/openrdf-sesame/

-v,--version

Print version information

-x,--exitOnError

Immediately exit the console on the first error

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-server-report.zip in the current directory.

graphdb

The graphdb command line tool starts the database. See more about its command line options here.

importrdf

The importrdf tool is used for offline loading of datasets. See more about it 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 x a rdf:Statement is not required.

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 .pie file

<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.