BackupRestore » History » Version 2
Paula Gearon, 12/06/2008 07:40 PM
Warning that LOCAL is not valid in the web UI
1 | 1 | Alex Hall - | = Backup/Restore = |
---|---|---|---|
2 | 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. |
||
3 | |||
4 | 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. |
||
5 | |||
6 | == Usage == |
||
7 | The `backup` and `restore` commands share a similar syntax: |
||
8 | {{{ |
||
9 | backup server to [local|remote] file; |
||
10 | restore server from [local|remote] file; |
||
11 | }}} |
||
12 | Where: |
||
13 | * `server` is the URI of the server to be backed up or restored (e.g. `rmi://localhost/server1`). |
||
14 | 2 | Paula Gearon | * `[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`. This option is not valid in the WebUI. |
15 | 1 | Alex Hall - | * `file` is the location of the archive file, given as a URI using the `file:` protocol. |
16 | |||
17 | == Examples == |
||
18 | {{{ |
||
19 | backup <rmi://localhost/server1> to <file:/tmp/serverbackup.gz>; |
||
20 | backup <rmi://localhost/server1> to remote <file:/tmp/serverbackup.gz>; |
||
21 | }}} |
||
22 | 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. |
||
23 | |||
24 | |||
25 | {{{ |
||
26 | backup <rmi://example.com/server1> to local <file:/tmp/serverbackup.gz>; |
||
27 | }}} |
||
28 | 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. |
||
29 | |||
30 | |||
31 | {{{ |
||
32 | restore <rmi://localhost/server1> from <file:/tmp/serverbackup.gz>; |
||
33 | restore <rmi://localhost/server1> from remote <file:/tmp/serverbackup.gz>; |
||
34 | }}} |
||
35 | 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. |
||
36 | |||
37 | |||
38 | {{{ |
||
39 | restore <rmi://example.com/server1> from local <file:/tmp/serverbackup.gz>; |
||
40 | }}} |
||
41 | 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. |