Project

General

Profile

Actions

BackupRestore » History » Revision 1

Revision 1/4 | Next »
Alex Hall -, 06/30/2008 08:51 PM


= Backup/Restore =
The TQL `backup` command is used to back up the entire contents of a Mulgara server into an archive file that stores RDF in a modified, compressed (gzip) N3 format. Mulgara makes the distinction between graphs stored internally to the server and those stored externally (which are accessed via Resolvers). Only the contents of internally-stored graphs are included in the contents of a backup file.

The TQL `restore` command is used to restore a Mulgara server to a previous state using an archive created by the `backup` command. This is useful for restoring the state of a server after a system failure, or for moving the contents of a server from one location to another. Be careful, as executing the `restore` command will overwrite any existing contents of the database with the archived contents.

Usage
The `backup` and `restore` commands share a similar syntax: {{{
backup server to [local|remote] file;
restore server from [local|remote] file;
}}}
Where: * `server` is the URI of the server to be backed up or restored (e.g. `rmi://localhost/server1`). * `[local|remote]` specifies the location of the backup file to be created (for `backup`) or read from (for `restore`). If `local` is specified, then the location is taken to be on the client's filesystem; if `remote`, then the location will be on the server's filesystem. If neither is specified, the default is `remote`. * `file` is the location of the archive file, given as a URI using the `file:` protocol. Examples {{{
backup <rmi://localhost/server1> to <file:/tmp/serverbackup.gz>;
backup <rmi://localhost/server1> to remote <file:/tmp/serverbackup.gz>;
}}}
Both of these commands back up the entire contents of the Mulgara server running at `rmi://localhost/server1` into an archive located at `/tmp/serverbackup.gz` on the server's filesystem.

{{{
backup <rmi://example.com/server1> to local <file:/tmp/serverbackup.gz>;
}}}
This command backs up the entire contents of the Mulgara server named `server1` running on `example.com` into an archive located at `/tmp/serverbackup.gz` on the client's filesystem. If the client and server are on different hosts, then the contents of the archive will be streamed across the network.

{{{
restore <rmi://localhost/server1> from <file:/tmp/serverbackup.gz>;
restore <rmi://localhost/server1> from remote <file:/tmp/serverbackup.gz>;
}}}
This command restores the contents of the Mulgara server running at `rmi://localhost/server1` from the archive located at `/tmp/serverbackup.gz` on the server's filesystem. If the server has any existing content when the command is executed, it is replaced by the archived content.

{{{
restore <rmi://example.com/server1> from local <file:/tmp/serverbackup.gz>;
}}}
This command restores the contents of the Mulgara server named `server1` running on `example.com` from the archive located at `/tmp/serverbackup.gz` on the client's filesystem. Once again, if the client and server are on different hosts, then the contents of the archive will be streamed across the network.

Updated by Alex Hall - almost 16 years ago · 1 revisions