stardog-admin db backup Manual Page


stardog-admin db backup —Create a backup of an existing database.


stardog-admin [ --krb5 ] [ --krb5-disable-rdns ] [ --server <server url> ]db backup [ {-p | --passwd} <password> ] [ {-P | --ask-password} ] [ --run-as <username> ] [ {-t | --to} <backup location> ] [ {-u | --username} <username> ] [ {-v | --verbose} ] [--] <db>


Use the Kerberos environment.
Disable reverse DNS lookup for Kerberos clients.
-p <password>, --passwd <password>
-P, --ask-password
Prompt for password.
--run-as <username>
User to impersonate when running the command
--server <server url>
URL of Stardog Server. If this option isn't specified, it will be read from JVM argument 'stardog.default.cli.server'. If the JVM arg isn't set, the default value 'http://localhost:5820' is used. If server URL has no explicit port value, the default port value '5820' is used. Example: 'stardog-admin --server server stop'
-t <backup location>, --to <backup location>
Provide a specific location to save the backup; overrides the default location.
-u <username>, --username <username>
User name.
-v, --verbose
Flag that can cause more detailed information to be printed such as errors and status. Exact output depends upon the command and options used.
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
The database which should be backed up


Create a complete backup copy of a database. As opposed to export, which is a logical copy and only provides a snapshot of the contents of the database, a backup is a physical copy and preserves database metadata in addition to the contents so an exact copy can be made during a restore. By default, backups are stored in the '.backup' directory in your Stardog home, but you can use the 'backup.dir' property in your 'stardog.configuration' file to specify a different location for backups or you can override any default using the -t/--to option. Within the backup directory, backups are stored by database, and for each database, in date-versioned directories.

Your typical backup directory would have a layout similar to this:

Within each of those directories are the actual backups themselves. If you want to restore a database from
one of those backups, you will have to use the complete path to the backup, not just the path to the top
level directory as specified by this property, ie, `db restore $STARDOG_HOME/.backup/myDb/2013-10-02`


Create a backup of the 'myDatabase' database in the default backup directory:

    $ stardog-admin db backup myDatabase

Save the backup of the database 'myDatabase' to a specific directory:

    $ stardog-admin db backup --to /my/backup/dir myDatabase