← All guides

Restic for the home lab: encrypted offsite backups that survive the server

Software · 10 min read · Published November 18, 2026

One number decides whether a home lab backup exists: the number of restores that have been proven on a machine that did not make the backup. Backup jobs that exit cleanly prove only that a program wrote something somewhere. Restic is a strong tool for closing that gap, because it writes encrypted, deduplicated snapshots to almost anything a lab already owns, and because its failure modes are plain enough to design around. This guide builds the full design: two repositories, an offsite copy the lab server cannot erase, a password custody rule, retention handled as the two steps it actually is, and a clean machine restore as the finish line.

What restic stores, and what it cannot do

Restic splits files into content addressed chunks and stores each unique chunk once in a repository, which can be a local path, an SFTP server, S3 compatible storage, or anything rclone can reach. Every snapshot looks like a full copy when it is browsed or restored, while a second snapshot of a mostly unchanged server adds only the changed chunks. A 5 GB database that changed by 50 MB uploads about 50 MB. Everything is encrypted on the client before it leaves the server, so the storage provider holds ciphertext it cannot read.

Two limits shape the whole design. First, restic has no server side component that enforces append only behaviour on plain object storage. If the lab server holds keys that can delete objects, a compromised or simply confused server can delete backup history, and bucket permissions or an append only key have to carry that protection instead. Second, the repository password is absolute. Lose it and the snapshots are unrecoverable ciphertext. The documentation offers no reset and no back door, which is why custody gets its own section below.

Two repositories: the layout

RepositoryWhere it livesWhat it protects againstCadence in this design
Local repositoryA NAS or second machine at home, reached over SFTPServer failure, accidental deletion, a bad updateTwice a day
Offsite repositoryObject storage such as Backblaze B2, at roughly US$6 per TB per month with a 10 GB free tier, checked November 18, 2026Fire, flood, theft, and anything that takes the whole houseWeekly, or nightly for small data sets

Together the pair satisfies the 3-2-1 rule: three copies of the data counting the live copy, two different kinds of storage, and one copy off site. The offsite repository gets an append only application key, restricted so the lab server can add snapshots but cannot delete them. Ransomware that reaches the server, or a script with a destructive flag, can fill the bucket with junk snapshots. It cannot erase the history already there.

What goes into the snapshots matters as much as where they land. For a typical lab server that means application data and volumes, configuration files, and database dumps taken in a form the database can restore from. Caches, media that can be downloaded again, and build artefacts stay out. A smaller, deliberate data set restores faster and gets tested more often, and a backup that gets tested beats a larger one that does not.

The password custody rule

The repository password needs to survive the exact event the backup exists for, which means it cannot live only on the server being backed up. The rule for a one person lab is two locations, neither of them the lab server. Location one is the password manager the operator already uses daily, stored as its own entry named for the repository it opens. Location two is a sealed offline copy, a printed or written record kept with household documents, updated on the rare occasions the password changes.

Each repository gets its own password, so one disclosure does not open both. The backup scripts read the password from a root only file on the server, because the jobs need it unattended. That file is a convenience copy for the machine, never the record of truth. If the server dies tonight, the restore tomorrow starts from the password manager entry, and that path is the one the restore test below exercises.

Retention is two steps, and pruning runs elsewhere

Restic retention confuses people because two commands do two different jobs. The forget command removes snapshot references that fall outside the keep rules, for example 7 daily, 4 weekly, and 3 monthly snapshots. The prune command then deletes the data no remaining snapshot references. Space is freed only by the second step. Running forget alone shrinks the snapshot list while the bucket stays the same size, which looks like a retention policy working and is not.

  1. Preview every new policy. Run forget with the dry run flag and read which snapshots each rule keeps before the policy is allowed to delete anything.
  2. Apply retention per repository. Each repository needs its own forget run, because copying snapshots between repositories only adds them.
  3. Prune from a separate machine. Pruning needs delete rights, and delete rights are exactly what the lab server should not hold over the offsite repository. A workstation or a small admin host runs forget and prune against the offsite repository with its own credentials, on its own schedule.
  4. Check integrity on a schedule. A weekly read back of a sample of each repository, 5 percent is a workable figure, catches silent corruption while older snapshots still hold clean copies.

Automate it, then watch for silence

A systemd timer on the server runs the backup jobs, twice a day to the local repository and on the chosen cadence off site. Automation creates a quieter risk than failure: a job that stops running altogether produces no error anywhere a person looks. The design therefore treats absence as the alarm condition. Each successful run touches a health check, and a missed window raises an alert. The monthly calendar entry matters as much as the timer: a restore rehearsal, every month, on the calendar next to the other household maintenance.

Prove it on a machine that has never seen the server

  1. Pick a clean machine. A spare laptop or a fresh virtual machine with restic installed and nothing else from the lab.
  2. Retrieve the password from the password manager. Not from the server, not from memory. This step tests custody at the same time as the data.
  3. List the snapshots in the offsite repository. Choose the most recent one. If the offsite copy restores, the harder case is proven.
  4. Restore a meaningful slice. One application data set plus its configuration is enough for the monthly drill; a full restore belongs in the annual one.
  5. Verify with checksums. Run the checksum verification against the restored files and read the result line by line. Every file reporting OK is the proof. A restore that merely completes is not.
  6. Record the date. One line in the lab notes: date, repository, snapshot, result. The next drill starts by reading it.

The decision underneath all of this is simple. A lab that will run the monthly drill can trust a two repository restic design with modest storage costs. A lab that will not test restores should spend its effort on the drill habit first and the tooling second, because untested backups in two places are still untested. Build the pair, separate the delete rights, file the passwords in two places, and prove the restore. Everything else is scheduling.

, Dex Carter, Tech Writer