← Writing

restic dedup makes nightly Docker-volume backups cost megabytes, not gigabytes

Content-defined chunking means nightly snapshots of mostly-unchanged volumes upload only the delta — a systemd timer plus an R2 bucket is the whole backup system.

My instinct said nightly snapshots of Docker volumes would balloon storage — a full copy per night. restic doesn’t work that way: it chunks content and deduplicates across snapshots, so a nightly backup of mostly-unchanged volumes uploads and stores only what actually changed. My nights cost megabytes.

# nightly, via systemd timer
restic backup /var/lib/docker/volumes --tag nightly

Pointed at a Cloudflare R2 bucket (S3-compatible, zero egress fees — which matters on the restore day), this plus a systemd timer is the entire backup system for my self-hosted stack.

The rule that makes it real: test the restore end to end. A backup you’ve never restored is a hope, not a backup.

← All writing Book a call →
Book a call → WhatsApp