So I built this whole site the other day. Hugo, PaperMod, a custom stylesheet with colours I sampled straight out of the banner image, a hero banner that behaves itself when you shrink the window. Took hours. Committed it to git twice, felt very pleased with myself, went to bed.
Then I reinstalled my distro.
You already know how this ends.
The part where I find out
Fresh install, home directory looked fine. My notes vault was there. Pictures were there. Downloads, full of the usual crap, also there. My Projects folder was sitting right where I left it, containing exactly two things, both belonging to a different project entirely.
No blog.
I ran a find across the entire filesystem for the project directory, because denial is a process and I wanted to watch it return nothing before I’d accept it. It returned nothing. Beautiful. Very quick about it, too.
Then I remembered the migration snapshots on my server. Three of them, taken at various points when I’ve moved this laptop between distros like a man who cannot commit to anything. Surely one of those had it.
The most recent one, taken right before this reinstall, contained: Desktop, Documents, my shell config, my terminal config, and Pictures. No Projects. Fantastic. Really glad I saved my colour scheme.
The one before that did have a Projects folder. My heart did a thing. I opened it. Same two unrelated projects, no blog — because that snapshot predates the blog by weeks. So the site was born and died in the gap between two backups, which is a hell of a way to go.
“But you used git”
I did use git. Two clean commits, nice descriptive messages, branch named main like a well-adjusted adult who has his shit together.
Here’s the thing about a local git repo that nobody enjoys learning the hard way: the entire history lives in a .git folder inside the project directory. Delete the project, delete the history. Git isn’t a backup. Git is a very good undo button that lives in the same building as the thing it’s undoing. Push it somewhere else or it’s just a diary you keep in the glovebox of a car you’re about to set on fire.
Setting up a remote was literally on my todo list from that session. It was item two. I got to item zero.
The banner image went too, since that was sitting in Downloads, and Downloads is where files go to be deleted by a man doing a spring clean at midnight who is absolutely certain he doesn’t need any of this.
What actually protected me: fuck all
Let’s be honest about the failure. It wasn’t bad luck. My server has a genuinely decent backup setup — Restic running twice, once to an external drive and once offsite to Backblaze B2, 7 daily / 4 weekly / 12 monthly retention, integrity checks, failure notifications straight to my phone. It’s good. I’m proud of it. I’d show it to people at parties if I went to parties.
It backs up /srv/appdata, /srv/sync, /srv/backup, and my compose files. All of which live on the server.
The laptop was contributing precisely fuck all to that. Every “backup” of my laptop was me, by hand, going “hmm, I should probably copy some folders before I nuke this thing,” and then copying whichever folders I happened to think of in that moment. Which is exactly why I have a pristine copy of my terminal theme and no copy of my actual work.
Manual backups back up whatever you remembered. Not whatever mattered. Those are very different lists and you only find out how different at the worst possible moment.
The fix
The elegant bit is that I didn’t need any new tooling. Syncthing was already running on both machines, already talking to each other, already doing its job for other folders. So:
My Projects folder is now a synced Syncthing folder, landing at /srv/sync/projects on the server. That path is already inside both Restic jobs. So the moment a file hits Projects on the laptop, it replicates to the server, and the next Restic run sweeps it into the local repo and B2. Nothing to configure in the backup scripts. It just inherited the entire chain.
Staggered file versioning is on at both ends, because plain Syncthing is a mirror, not a backup — delete a file here and it will cheerfully, instantly delete it there, like an over-eager intern. Versioning means the server keeps the old copy in .stversions instead of enthusiastically helping me destroy my own work.
One gotcha, and it cost me a genuinely confusing five minutes: Syncthing on my server runs in Docker, with /srv/sync mounted as /var/syncthing/data inside the container. So when I typed the host path into the web UI, it threw mkdir /srv/sync: permission denied and refused to start the folder. It wasn’t a permissions problem at all — that path simply does not exist from inside the container. You have to give it the container path. Obvious in hindsight. Deeply fucking irritating at the time.
And finally, the thing I should have done first, before any of the rest of it: a bare git repo on the server, sitting inside a path Restic already backs up. git push now sends my history somewhere that isn’t this laptop, which is the entire point of a remote and something I will not be forgetting again.
Rebuilding
Here’s the one genuinely smart thing I did last session: at the end of it, I wrote the whole setup up properly. Every CSS variable with its hex value. The full config file. The exact ImageMagick command. The layout override trick and why it works. All of it in my notes vault, which — being a synced folder — survived without a scratch.
Rebuild took about fifteen minutes. Install Hugo, scaffold the site, add the theme submodule, paste three files in, done.
The thing that took hours the first time was never the typing. It was the working out — the hunting through theme files, the trial and error, the six attempts at centering a div. Working out doesn’t need to be redone if you wrote it down. Typing is cheap. Figuring it out again is not.
The only real casualty was the banner. I had to re-source it, and the copy I got back is 1855px wide instead of the original 3710px. Not the end of the world — I dropped the CSS max-width to match, so it isn’t being upscaled and going soft on big monitors. Half the resolution, none of the blur. You’d never know unless I told you, which I just did, because apparently I can’t help myself.
The lesson, such as it is
Backups you have to remember to run are not backups. They’re a hobby you do occasionally, and the gap between “when I last felt like it” and “right now” is precisely where your work goes to die.
Automate it or accept that you’re going to lose something eventually. There’s no third option where you’re just really diligent about it forever, no matter how much you’d like there to be. I thought I was that guy. I was not that guy.
Anyway. Site’s back. It’s now backed up three separate ways, which feels like wild overkill until you remember I’m the same idiot who deleted it in the first place.