Viewing remote restic
snapshots and backed up files is surpisingly easy.
$ unset HISTFILE
$ export RESTIC_REPOSITORY="s3:https://s3.amazonaws.com/restic-demo"
$ export AWS_ACCESS_KEY_ID="AKIAJAJSLTZCAZ4SRI5Q"
$ export AWS_SECRET_ACCESS_KEY="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"
$ export RESTIC_PASSWORD="I9n7G7G0ZpDWA3GOcJbIuwQCGvGUBkU5"
$ export TMPDIR="$HOME/tmp/restic"
$ export RESTIC_CACHE_DIR="${TMPDIR?}/.cache"
$ mkdir -p ${RESTIC_CACHE_DIR?}
$ export MOUNTDIR="$HOME/mount/restic"
$ mkdir -p ${MOUNTDIR?}
Having configured restic
, we should now be able to mount the remote repo:
$ restic mount ${MOUNTDIR?}
repository 513a3d69 opened successfully, password is correct
Now serving the repository at /home/user/mount/restic
When finished, quit with Ctrl-c or umount the mountpoint.
Now, open up a new terminal and change directory into the ~/mount/restic
directory.
$ cd mount/restic/
$ ls -l
total 0
dr-xr-xr-x 1 user group 0 Apr 11 15:48 hosts
dr-xr-xr-x 1 user group 0 Apr 11 15:48 ids
dr-xr-xr-x 1 user group 0 Apr 11 15:48 snapshots
dr-xr-xr-x 1 user group 0 Apr 11 15:48 tags
$ cd snapshots/latest