Restic #
These tips are assuming that you have your RESTIC_REPOSITORY
and necessary API keys, e.g.
B2_ACCOUNT_{ID|KEY}
, set in your environment. This enables you to simply use restic [command]
instead of specifying the repository with -r <repo>
and entering the password interactively.
*\*pssht!\** I like using [borg](/docs/wiki/borg/) a lot more. Too bad `borg` doesn't backup to object storage though. If that's important to you check out [kopia](https://github.com/kopia/kopia), too.
Restore a Single File #
List your snapshots:
restic snapshots
Fetch a list of files within a snapshot or search for one:
restic ls -l {latest|snapshot-id}
restic find
Restore a single file matching a pattern:
restic restore \
--target /restore/path \
--include filename_or_pattern \
{latest|snapshot-id}
Mount and Browse a Snapshot #
Or mount a snapshot and browse inside interactively:
restic mount /mount/path
ls -la /mount/path