Del Jones

Stage. Travel. Photos. Thoughts...

Backup. My new goto..!

result

I self-host most, if not all, of my digital life: email, websites, music, and photos. As I say, most, if not all. I do have a Google account, but there’s not really much on it. Which naturally begs the question: Do I backup all this stuff? The answer is yes — very much so; you would be crazy not to.

The self-hosting platform I use is YunoHost. I’ve been running this server for nearly six years now, and touch wood, I’ve had very few issues with it. It comes with a neat little backup and restore system. It’s not perfect, but it does the job. I have a cron job that runs every day, backing up the whole system once a week, with email and user data backed up every night in the small hours. It’s great, but as I say, it’s not perfect. Every backup is a fresh one, so if you want to clear out old backups, you have to go digging through them manually. In other words, it’s not incremental, and deleting old backups is a bit of a faff because there’s no batch or multi-select option.

I’ve also been using another backup system that is gradually replacing the YunoHost backup, called Restic. My YunoHost backups live on an external USB drive (yes, I know all about the 3-2-1 backup rule, off-site backups, and all that good stuff), while Restic is backing up to a different drive. At the moment, that covers user data and emails only. Restic is incremental, deduplicated, encrypted, compressed, and very fast.

The downside to Restic is that it’s a CLI app, so everything has to be done in the terminal. That makes setting up backups, checking them, and restoring them a bit painful. Once I’d tested everything and got it working, I added the Restic backups to my cron job, but checking and restoring still felt like a bit of a time-consuming slog. That has changed recently. There’s an excellent web-based app called Backrest, which is available in the YunoHost application catalogue. Backrest is a web front end for Restic, and it’s changed everything for me. No more bashing away in the terminal — everything is handled through the app. It’s brilliant, and a proper game changer if you use Restic for backups.

Backrest also lets you use hooks to set up notifications so you can keep an eye on how your backups are behaving. I’m using healthchecks.io, although at the moment I’m still wrestling with the grace / period settings, because the notifications are a bit hit and miss right now. Even so, Backrest really is a set it and leave it app. I’ve been testing it heavily, and it hasn’t missed a beat. I’m not yet sure it will completely replace the YunoHost backup, which has rescued me from a few scrapes in the past. The Yunohost restore process does make sure everything is put back in the right place within the system, and it just works.

With the combination of YunoHost backups and Restic through Backrest, my backup setup has become more granular and more regular across two separate drives. I’d like to set up an off-site Borg or Rsync backup as well, but my data is running to over 1 TB, so the cost and time just seem too much at the moment. For now, though, I’m confident that I’ve got a solid backup system in place, and I’d encourage anyone who self-hosts to take a look. Restic and Backrest are both free, and you can run them on your laptop or desktop too, so they could also give you a perfectly good backup solution even if you don’t self-host.

backup, selfhost, computers, Opinion

⬅ Previous post
Picture of the week no. 5

Next post ➡
Navidrome + Feishin. The way to go...