Some Bits: Nelson's log

3 posts about restic

restic cheatsheet notes for myself

I use Restic for backups. It’s great! But I forget how to use it, the usability for what I’m doing is not great. I’m using resticprofile as a CLI frontend. Last I looked backrest was a good option for a Web GUI: I should reconsider and switch.

Anyway, some notes on the current setup on my personal Linux box with all my important files. (This is the host tt.)

Configuration

Important stuff is in /usr/local/etc/restic, including passwords (also in 1Password) and profiles.toml

/ and /home/nelson are backed up locally to /mnt/backup/restic (another disk). /home/nelson is also backed up to BackBlaze emulating an S3 datastore in a bucket named “restic2”.

(there’s also backups for other hosts in Backblaze in other buckets and honestly I’ve forgotten what they are for! See Below for update)

Shell setup

alias rp='/usr/local/bin/resticprofile --config /usr/local/etc/restic/profiles.toml’

Look around

rp profiles
rp home.show
rp home.snapshots
rp home.mount /tmp/m

Check metadata integrity

rp home.check
rp root.check
rp bbhome.check

Check local home backups are working by verifying 5% of the data

rp home.check --read-data-subset=5%

Check backblaze backups with read (note: slow)

rp bbhome.check --read-data-subset=1%

Maintenance (slow!)

rp home.prune
rp root.prune
# rp bbhome.prune # may be expensive!

Somebits.com backups (2026-05-11)

My public server somebits.com backs up all of / to BackBlaze via Restic. The details are described in a 1Password note “Restic backup password for somebits.com” and contains a TOML file for resticprofile and the necessary passwords and keys. I tested it today (May 11 2026) and the backup seems to be working.

I also have rsnapshot backups of just /home configured. That doesn’t include /var/www or the important stuff in /etc.

backrest GUI for restic

I’ve been using Restic for backups for most of a year now. It’s terrific. But Restic is a bit of a low level tool, using it requires some fiddly config files and setting up cron jobs, etc. There are a bunch of frontends to Restic that turn it more into a user product. I’ve been using resticprofile but don’t love it, it’s confusing and awkward.

Backrest is new bae. Turns out I want a web GUI for this kind of thing, who knew? It has a very nice and simple structure for configuring Restic. You create repositories, then you create plans. There’s good GUIs for configuring things like retention policies, cron schedules, etc. It runs persistently to provide the web GUI and takes care of launching restic as needed and making things happen.

Remarkable number of grace notes too. I love that every configuration screen has an option in the GUI to show it as a JSON file, making it easy to keep track of what’s actually happen. Also it has remarkably good live web updates. Not just showing you a job is running but specific status output updated once a second to see, say, how many files of the backup have been completed so far.

It’s just a really nicely developed product.

Restic for backups

I finally have a better backup solution: Restic. This project has emerged as the open source favorite for backups. It’s easy to see why: it’s very capable and a very professional product. Don’t be put off by the scary 0. version number: there’ve been releases for seven years now. And it seems really solid.

For many years now I’ve relied on rsnapshot for backups. It’s nothing fancy but is straightforward. But it basically requires you have root access on both the source machine and the backup server. (rsnapshot stores actual copies of your files, complete with timestamps and owners). And it’s slow and creaky and, well, time for something new.

Restic is very fancy. The underlying repository datastore slices your files up into 1MB blobs and storing them in a sort of content-addressable store. Everything is encrypted and indexed by the SHA256 hash of the data. That makes verification, deduplication, etc straightforward and fast. The downside is the backup format is entirely opaque; you need the restic binary to work to restore files. (It is documented, but far too complicated to easily reimplement.) The upside is it is very efficient.

The product packaging is fantastic for open source. It ships as a single self contained Go binary. The docs are terrific including a quickstart that gives a vey good experience. It supports a wide variety of backup server types from local disk to sftp to cloud providers (or rclone if you want to do your own thing). There’s good tools for inspecting backups, verifying them, restoring them (including a FUSE mount). Also a first class tool for removing old snapshots. The tool gives a lot of confidence.

restic runs really well and fast. I can back up 50GB of my data to 38GB in the repo in about 6 minutes, about the speed the disk runs at (and this over NFS). An empty incremental takes just 10 seconds.

The one thing missing is some usability for system integration; you’re left writing your own shell scripts and cron jobs to use it. Fortunately there’s a CLI frontend called resticprofile which helps with that stuff, driven by a simple config file. It’s not quite as clean a product as restic itself but it has good docs and seems to work well. And what it does is not mysterious, it’s just invoking restic, so I’m not as concerned about the niceties.

Edit: another option for managing restic is backrest, a web GUI. Update Aug 2024: finally gave this a try, it is very nice.

It’s a real pleasure to use a nicely built open source tool like restic.

Update 2: offsite backups

I’m using Backblaze now for offsite backups. It seems to work OK and is fast and cheap ($6/TB/mo with no minimum. plus extra for bandwidth if you use much.) Was fairly straightforward to get working with Restic. Configuring the bucket is a bit tricky; I turned off encryption (restic is encrypted already) and file retention.

I tried SFTP briefly to a small server I have. It was very slow, like 6 minutes for 2GB (or less). To be fair my server is slow.

Update: system backup config

Here’s the fairly simple resticprofile config I’m using to back up my main Linux system. It backs up to local disk once an hour and keeps old dailies, weeklies, monthlies, and yearlies on a reasonable schedule. The only subtle thing here is I’m backing up in two separate jobs, once for my home filesystem and once for the system root.

version = "1"

[global]
  ionice = true
  nice = 5
  scheduler = "crond"
  restic-binary = "/usr/local/bin/restic"

[default]
  repository = "local:/mnt/backup/restic"
  password-file = "/usr/local/etc/restic/password"

# Everything but my home directory

[root]
  inherit = "default"
[root.backup]
  source = [ "/" ]
  exclude = [ "/home/nelson", "swap.img" ]
  one-file-system = true
  schedule = "*-*-* *:37:15"
  schedule-permission = "system"
  schedule-log = "/var/log/restic.log"
[root.retention]
  keep-hourly = 24
  keep-daily = 7
  keep-weekly = 4
  keep-monthly = 60
  after-backup = true

# My home directory

[home]
  inherit = "default"
[home.backup]
  source = [ "/home/nelson" ]
  one-file-system = true
  schedule = "*-*-* *:07:15"
  schedule-permission = "system"
  schedule-log = "/var/log/restic.log"
[home.retention]
  keep-hourly = 24
  keep-daily = 7
  keep-weekly = 4
  keep-monthly = 60
  after-backup = true