Member-only story
CODEX
Restic Backup IV — Real-life examples

TL;DR
This blog post is the fourth of four posts about restic, a simple, beautiful, and extremely versatile file backup solution. In this post, I will show real-life examples on how to recover forgotten snapshots, mounting the whole repository to a server, changing the repository encryption password, and self-updating the installed restic version.
The restic blog post series
Restic Backup I — Simple and beautiful backups
Restic Backup II — In action
Restic Backup III — How to set up
Restic Backup IV — Real-life examples (this post)
Forgotten snapshots
If you accidentally “forgot” a snapshot by using the following command:
There is still hope to restore data from that snapshot if you haven’t called the “prune” command yet by using the “recover” command:
The “recover” command does create a special snapshot that contains every snapshot (only every unique snapshot). But I will emphasize what really happens when calling the “recover” command.
Imagine we already have two snapshots containing the following files:

We create a third and fourth one also containing a file called “c”.
We call the “recover” command and get a fifth special snapshot containing three roots with the following files: