stardog data export Manual Page

NAME


stardog data export —Exports the contents of a database in RDF.

SYNOPSIS


stardog [ --krb5 ] [ --krb5-disable-rdns ]data export [ --compression <Compression> ] [ {-f | --format} <RDF Format> ] [ {-g | --named-graph} <export named graph(s)>... ] [ {-p | --passwd} <password> ] [ {-P | --ask-password} ] [ {-s | --server-side} ] [ {-u | --username} <username> ] [ {-v | --verbose} ] [--] <dbname> <export file>...

OPTIONS


--compression <Compression>
Compression format [GZIP, BZ2] for the exported data.
-f <RDF Format>, --format <RDF Format>
RDF Format [NTRIPLES, RDF/XML, TURTLE, PRETTY_TURTLE, TRIG, TRIX, N3, NQUADS] for the exported data.
-g <export named graph(s)>, --named-graph <export named graph(s)>
Named graph(s) to export. Multiple options are separated by whitespaces, e.g., '-g "urn:context1 urn:context2"'. The keyword ALL can be used if all named graphs in the db are desired, and the keyword DEFAULT can be used to export the default graph. When used as the last option, values should be followed by '--' to denote the end of the named graphs."
--krb5
Use the Kerberos environment.
--krb5-disable-rdns
Disable reverse DNS lookup for Kerberos clients.
-p <password>, --passwd <password>
Password.
-P, --ask-password
Prompt for password.
-s, --server-side
Export the data to the server
-u <username>, --username <username>
User name.
-v, --verbose
Verbose flag that causes more detailed information to be printed
--
This option can be used to separate command-line options from the list of argument, (useful when arguments might be mistaken for command-line options
<dbname> <export file>
The name of the database or the full connection string of the database to connect to. If only the name is provided, the default server URL will be pre-pended to the name of the database in order to construct the connection string. Connection parameters such as ';reasoning=true' can be included in the provided database name. Connection parameters specified like this can be overridden by specific options on the command. The default server URL will be read from the JVM argument 'stardog.default.cli.server'. If the JVM argument is not set, the default value 'http://localhost:5820' is used. If the server URL has no explicit port value, the default port value '5820' is used. To use a secure connection, you should specify the full connection string and postfix 's' to the protocol, e.g. https. The second argument is the file to write the output to; if not specified, the output is written to STDOUT. No file can be specified for server-side exports; the output will be written to a file under the STARDOG_HOME/.exports directory.

DISCUSSION


Exports the database in the specified format to the specified output file, else to STDOUT. By default, only the default graph will be exported. To export the entire database, or a specific set of named graphs, use the -g/--named-graph parameter to specify the graphs to export. If no format is specified, the format is determined from the output file name; otherwise, TURTLE is the default. Exports of large databases should be performed on the server using the --server-side flag. This will save the RDF using the specified format in the export directory for the server. The default server export directory is '.exports' in your $STARDOG_HOME but can be changed via 'export.dir' in the stardog.properties file.

EXAMPLES


Export the database 'myDb' as NTRIPLES:

    $ stardog data export --format NTRIPLES myDb

Export the entire database 'myDb' to a file in TURTLE:

    $ stardog data export --named-graph ALL -- myDb export.ttl

Export two named graphs of the database 'myDb' as TRIG:

    $ stardog data export --named-graph http://examples.org/graph1 http://examples.org/graph2 --format TRIG myDb

Export the database 'myDb' to a file in TURTLE:

    $ stardog data export myDb export.ttl

Export the database 'myDb' to a gzipped file in TURTLE:

    $ stardog data export myDb export.ttl.gz

Export the entire database 'myDb' as TRIG to a file on the server

    $ stardog data export --named-graph ALL --format TRIG --server-side myDb