How I Built an Incremental, Off-Site Backup Strategy for My Homelab with Restic
Incremental, encrypted backups with Restic, Synology and Cloudflare R2

In my homelab, I run a Proxmox environment where I host my own Gitea instance. That is where I version-control all my projects, run my CI/CD workflows, and let my AI agents work. With AI becoming a central part of my daily workflow, I spend a huge amount of time in there—which means that single Gitea instance has suddenly become critical infrastructure.
If I mess something up, accidentally delete a repository, or let an AI agent go rogue and break things, I need a reliable safety net. Here is how I went from basic VM snapshots to a proper, automated, incremental backup pipeline using Restic, a Synology NAS, and Cloudflare R2.
The Limits of Proxmox Snapshots and rsync
My first instinct was to rely on Proxmox’s built-in backup tool. It’s great because you can schedule daily or weekly backups of an LXC container or a VM and dump them straight onto a NAS.
The catch is that Proxmox generates a single monolithic archive file. While that’s convenient for restoring a full machine onto another Proxmox node, you can’t easily browse the filesystem inside it. If my Proxmox host goes down and I don't have another Proxmox environment on hand to spin things back up, I still want direct access to my raw files, databases, and Git repositories.
In the past, my go-to workaround for file-level backups was a quick Bash script that zipped everything up and used rsync to push it to a remote location. It works, until it doesn't: if something gets corrupted on the source machine, rsync will happily overwrite your good remote files with broken ones.
Discovering Restic: True Incremental Backups
That’s what led me to Restic, an open-source tool dedicated specifically to backups.
The killer feature for me is how it handles incremental backups. Suppose I’m backing up a machine with 1 GB of data, and I want to keep one backup per day for a full week. Instead of eating up 7 GB of storage, Restic stores the initial 1 GB and only adds the tiny blocks that actually changed each day. For someone backing up active Git repositories every day, that is a massive win.

My Backup Architecture
To keep things clean and decoupled, I didn't install the backup logic directly on every single machine. Instead, I built a dedicated backup orchestrator inside its own LXC container on Proxmox.
Here is how the pipeline runs on a daily schedule (and even multiple times a day for critical services):
- Pull via SSH: The backup LXC connects over SSH to the target machines on my network, triggers a local dump/archive of the critical data (like Gitea’s files and database), and pulls it back onto the orchestrator container.
- Local Deduplication to Synology NAS: From there, Restic writes to a repository on my Synology NAS over SFTP, handling the deduplication and incremental snapshots.
- Off-Site Sync to Cloudflare R2: Once the data lands on the Synology NAS, the NAS automatically syncs the Restic repository up to a Cloudflare R2 bucket.

On top of that, everything Restic writes is encrypted out of the box. To read or restore anything from the NAS or Cloudflare R2, I have to use the encryption key generated when I initialized the repository.

The day-to-day checks are deliberately simple:
systemctl list-timers backup.timer
restic snapshots --tag gitea
restic check --read-data-subset=5%Peace of Mind (and Tiny Storage Footprints)
To make sure I actually have visibility into whether things are working, I hooked the pipeline up to ntfy. Every time a backup completes, I get a push notification right on my phone showing the status and the size of the backup.
Seeing those numbers every day really proved the value of this setup. Even though I push code and run agents on my Gitea instance constantly, the daily backup size only grows by a few megabytes a day.
Overall, Restic has been a great discovery. It’s lightweight, secure, and has officially become my default standard whenever I need to protect sensitive data in my homelab.
Comments
No comments yet