I built this repo to make backups less ad hoc. It started with a Borg script and host-specific pattern files, then grew into tooling for migrating old Arq backups into Borg, and later picked up an offsite replication step to Backblaze B2.
At the top level, backup.sh is the boring useful part. It looks up a pattern file for the current host, sorts restore-style R rules by modification time, writes logs under log/$HOSTNAME/$SESSION, and pushes an archive into the remote Borg repo on serverbox.zone. That is already enough to make the thing practical: one script, one place to run it, machine-specific file selection, and logs I can actually inspect later.
The more interesting bit is arq/. That directory is a pile of Python tools for pulling apart Arq 5 backups and rebuilding their history in Borg. The README is pretty explicit about the goal: not just restore the latest snapshot, but walk commit history over time and turn each Arq commit into a Borg archive. There are scripts for listing computers, folders, and commits, scripts for restoring files incrementally, and marker files to keep track of what step completed cleanly.
That marker-based flow is the part I like here. Backup migration gets weird fast once you hit interrupted runs, metadata mismatches, permissions nonsense, or missing blobs. restore.py, restore_files.py, check_restore.py, and generate_report.py all point at the same conclusion: getting data back is only half the job, the other half is being able to tell whether the result is good enough to trust.
Later on I added offsite.sh, which does the sensible thing instead of the exciting thing. It SSHes to the backup host, checks that Borg is not locked, takes a ZFS snapshot, and syncs that snapshot to Backblaze B2 with rclone. Copying a snapshot is a lot less spooky than copying a live tree that might still be changing.
There is also a sync/ directory describing a separate Syncthing-based workflow for live project folders. I kept that concern separate on purpose. Syncthing is for keeping active files around. Borg is for immutable history. Mixing those ideas too much is how you end up debugging something stanky at 1am.
Host-specific Borg backups — backup.sh plus patterns/THEODORE, patterns/ZULU.local, and patterns/ViFiveMBP define what each machine backs up and where the archive lands.
A reproducible dev shell — flake.nix gives me a lightweight environment with the tools needed to run and maintain the workflow.
Arq migration tooling — the arq/ scripts document the data format, decrypt and parse Arq metadata, restore trees incrementally, check results, and generate reports about what happened.
Offsite replication — offsite.sh snapshots the remote ZFS dataset and syncs it to Backblaze B2 so the backup server is not the only place the backup exists.