The circularity: Velero backs up into Garage S3, which runs inside the Kubernetes cluster it’s backing up. Cluster lost → Garage PVC lost → Velero backup bucket gone → nothing to restore from.
It’s the backup equivalent of locking the spare key inside the safe it opens. An offsite target existed in config but was never activated, and that kind of gap stays invisible until you need the backup.
View the complete homelab infrastructure source on GitHub
The Two-Problem Stack
Two issues compound:
Problem 1: Backup Circularity
Velero’s backup storage location points to Garage, an S3-compatible object store running as a StatefulSet inside the cluster. Every Velero backup (daily snapshots of Vault, Authelia, databases, ArgoCD configs) lands in a bucket that only exists while the cluster survives.
Cluster lost → Garage PVC lost → Velero backup bucket gone → nothing to restore from
PBS backs up the VM/LXC disks to a Seagate 2TB External HDD*, but PBS runs on the same physical host, a BMAX Mini PC*. Lose the host and the USB HDD together and nothing is recoverable at the VM layer. Velero was supposed to be the last safety net, and it was circular.
Problem 2: Torn-State Hazard
Two PVCs with different storage backends, different failure modes:
| PVC | Storage | Location | Failure mode |
|---|---|---|---|
garage-meta | local-path | k3s node | Node-pinned, survives if node survives |
garage-data | NFS (nfs-client) | NFS LXC | Survives if NFS LXC survives |
On 2026-07-12, an unclean Garage shutdown (OOM kill) left db.sqlite corrupted. NFS was not the cause this time: garage-meta had been on local-path since 2026-06-23, when an earlier corruption (“database disk image is malformed”) traced back to the NFS/SQLite locking incompatibility and forced the metadata onto local disk. Local disk fixed the locking problem. It doesn’t make SQLite immune to a process killed mid-write. The metadata (SQLite, bucket/key ownership, access grants) and the actual object data were on different volumes with different rollback fates. A partial restore or node loss would leave one without the other, with no clean way to reconcile them.
The Four Options
Option A: Consolidate meta + data on one volume
Move garage-meta from local-path to NFS (same backend as garage-data). Both PVCs on the same storage class → same snapshot/restore fate.
Verdict: Fixes torn state but not circularity. NFS for SQLite is proven fragile: the 06-23 corruption happened while garage-meta was on nfs-client, and moving it back would reopen that. The opposite direction, moving data to local-path, needs disk I don’t have yet.
Option B: External off-cluster target (Cloudflare R2)
Activate the existing r2-offsite backup storage location. Velero dual-targets: in-cluster Garage for speed + off-cluster Cloudflare R2 for bootstrap.
Cluster lost → Garage gone → Velero still has offsite copy on R2
Bootstrap: rebuild cluster → ArgoCD → Velero → restore from R2
Cost: ~$0.015/GB/month on R2, egress free, first 10 GB of storage free each month. At current backup size (~5–10 GiB), negligible. Risk: near zero. It’s additive; no existing backup path changes.
Verdict: Directly solves circularity. The existing R2 config is ready and only needs credentials and a “go”.
Option C: PBS as the primary recovery layer
Lean into PBS as the from-scratch recovery path. PBS already backs up all VMs/LXCs (including the k3s VMs that carry Garage’s data). Velero becomes a convenience layer for single-app restore, not the bootstrap path.
Verdict: Already the real bootstrap path (DR Tier 1-4). Velero is Tier 5, usable only if Garage survived. PBS is the real safety net. The circularity is a Velero-level problem, not a PBS-level one.
Option D: Combine B + C (what I chose)
Activate R2 offsite for Velero (breaks circularity) and treat PBS as the primary VM-level recovery layer. Velero becomes the single-app/namespace convenience tool with a real offsite target.
| Layer | What it covers | Recovery path |
|---|---|---|
| PBS | VM/LXC disks, full host recovery | Restore VMs from PBS → cluster up |
| Velero + R2 | App-level config, secrets, databases | ArgoCD → Velero → restore from R2 |
| Garage rebuild | If PVCs are lost entirely | Terraform re-creates buckets, ESO re-seeds keys |
Verdict: Covers both problems. R2 breaks circularity (zero risk, additive). PBS handles VM-level recovery (already there). Rebuilding Garage from scratch is the fallback if its PVCs are lost, which beats a partial restore that could leave metadata and data inconsistent.
The Recovery Model
Three independent layers, each covering a different failure scenario:
Scenario → Recovery path
─────────────────────────────────────────────────────
Single app crash → Kubernetes restart (self-heals)
Single PVC lost → Velero restore from R2 offsite
Full cluster lost (host survives) → PBS restores k3s VMs → Velero from R2
Host + USB HDD lost → New host, rebuild cluster from Git, Velero from R2
No single layer has to be perfect. Each layer covers the failure modes the layer below misses. Garage’s torn-state problem becomes irrelevant when the recovery procedure is “rebuild from scratch” rather than “restore from backup.”
Implementation (Zero Downtime)
The R2 activation was purely additive; no existing backup path changed:
- Create Cloudflare R2 bucket (free tier)
- Populate
r2-backuplocation.ymlwith real R2 credentials via External Secrets Operator - Apply the
daily-offsiteVelero Schedule (already committed) - Run one test backup, verify with
velero backup describe - Confirm
PodVolumeBackupentries present for PVCs
The in-cluster Garage target stays. Velero now writes to both through separate schedules: Garage for fast local restores, R2 via daily-offsite for bootstrap from scratch. If Garage is gone, R2 still has a copy.
What I’d Change
-
Implement R2 sooner. The config existed for weeks before activation. The circularity was a known risk, and “I’ll do it later” is exactly how disaster recovery gaps happen.
-
Add a Velero backup age alert. Alert when the most recent successful backup is older than 48 hours. If backups silently stop, you want to know before you need one.
-
Test the full recovery path. PBS restore of k3s VMs → cluster boot → ArgoCD reconciliation → Velero restore from R2. An untested recovery path is a theory, not a plan.
Backup circularity is a common structural flaw in self-hosted Kubernetes: the tool that protects you depends on the thing you’re protecting. The fix is always an independent offsite layer. Cloudflare R2 costs next to nothing at homelab scale, and with free egress you’re not penalized for actually restoring. The implementation was the easy part. The hard part was admitting my backup didn’t survive the scenario I built it for.
Further reading: Designing Data-Intensive Applications by Martin Kleppmann* isn’t a backup book, but its chapters on replication, consistency, and partial failures explain why torn state between metadata and data is so hard to recover from.