Restoring without Relica
Relica backups can be restored using a third-party open source command-line tool called restic, which Relica uses to help make your backup archives.
Restic is available for all platforms or can be built from source. The only other prerequisite is access to your backup repository.
It's easy to use restic for restores on all platforms. We'll show you how to locate the backup repository, list snapshots, and do a restore.
Locating the respoitory
Inside a Relica destination, there are a number of subfolders. Typically the backup repository is in relica_destination/backups/default/
.
The repository has several top-level folders, including data
, index
, keys
, locks
, snapshots
, and a file called config
.
For convenience in running restic commands, we recommend setting an environment variable now with the path to this folder, for example:
export RESTIC_REPOSITORY=/path/to/relica_destination/backups/default
Otherwise, you can use restic's -r
flag to set the repository manually on each command.
Provide your password
For convenience in running the commands, provide your encryption password by setting an environment variable:
export RESTIC_PASSWORD=supersecret1234
If you don't set this environment variable, you can alternatively enter your password each time you run the restic command.
List snapshots
To see what snapshots are in the repository:
restic snapshots
ID Date Host Tags Directory
---------------------------------------------------------------------------------------------------------------------------------------
40dc1520 2015-05-08 21:38:30 5323d27e-6e22-4ecb-a163-ef44fe0751bb backup:ffd94cdb-03c0-45d3-a854-6aaa77f0e924 /home/user/work
79766175 2015-05-08 21:40:19 5323d27e-6e22-4ecb-a163-ef44fe0751bb backup:ffd94cdb-03c0-45d3-a854-6aaa77f0e924 /home/user/work
bdbd3439 2015-05-08 21:45:17 4cf2e8d8-fadf-43ae-bc6b-2092c2d6d89b backup:497e4d1c-7389-4c3b-9bb7-051268e7c41f /home/art
590c8fc8 2015-05-08 21:47:38 3784c07a-fee2-4a0b-a397-3998fa085558 backup:1b366abd-a955-400f-a99c-1a7f6ec38ec2 /srv
9f0bc19e 2015-05-08 21:46:11 4cf2e8d8-fadf-43ae-bc6b-2092c2d6d89b backup:497e4d1c-7389-4c3b-9bb7-051268e7c41f /srv
The Host
field shows the ID of the Relica origin (computer) that created the backup. That ID will match one for one of the computers in your account. Similarly, the Tags
field for each snapshot will also include the ID of the Relica backup configuration that created it.
You can get this output in JSON format using restic's global --json
flag.
See the restic snapshots docs for more information about how to use this command.
Restoring a snapshot
Once you've found a snapshot to restore, make note of its ID (the left-most column). Restoring it is then very easy:
restic restore 40dc1520 --target ~/Downloads/my_restore
This restores the contents of snapshot 40dc1520
into your Downloads folder.
See the restic restore documentation for more options and details about how to use this command.