←Back to Guides
๐Ÿ’พDisaster Recoveryโฑ๏ธ 13 min read•Updated November 2026•โœ๏ธBy Chris

Zero-Loss Backup Architecture: 3-2-1-1-0 Strategy, Restic/Borg Deduplication & Restore Drills

Remember: RAID and cloud folder sync are NOT backups. Protect servers and workstations against ransomware and drive failure using the 3-2-1-1-0 rule, client-side AES-encrypted Restic snapshots, immutable Object Lock buckets, and monthly restore drills.

#Backups#3-2-1 Rule#Restic#BorgBackup#Disaster Recovery#Snapshots#Encryption

1. The Modern 3-2-1-1-0 Rule (Why RAID & iCloud/OneDrive Are Not Backups)

RAID mirrors protect solely against hardware drive failureโ€”an accidental rm -rf, buggy migration, or ransomware encrypts both mirrored drives instantaneously. Two-way cloud folder sync propagates deletions across every laptop within seconds. Resilient recovery requires 3 total copies, 2 distinct media types, 1 offsite region, 1 immutable/air-gapped copy (append-only S3 Object Lock), and 0 unverified restore errors.
Rule DigitArchitectural RequirementThreat MitigatedCopy
3 CopiesProduction data + local snapshot + remote repoSingle storage outage
2 Mediae.g. Local NVMe ZFS/Btrfs + Cloud S3/B2Controller firmware or SSD batch bug
1 OffsiteSeparate physical building / cloud regionFire, flood, theft, DC outage
1 ImmutableAppend-only / Object Lock (no delete permission)Ransomware or attacker with root keys
0 ErrorsAutomated restore test passes checksum checkSilent repository corruption

2. Zero-Knowledge Incremental Snapshots With Restic & Backblaze/S3

Modern deduplicating tools like restic and borgbackup slice files with Content-Defined Chunking (Rabin fingerprints), encrypt every block locally with AES-256/Poly1305 before packets ever leave your machine, and upload only changed blocks.
Initialize, Backup & Prune Encrypted Offsite Snapshots With Restic
export RESTIC_REPOSITORY="s3:s3.eu-central-003.backblazeb2.com/my-encrypted-backups"
export RESTIC_PASSWORD_FILE="/root/.restic-pass"

restic init
restic backup /srv/app /etc --exclude-caches
restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 6 --prune

Encryption keys remain strictly local so cloud storage breaches reveal zero readable files.

3. Never Tar Live Database Files: Consistent SQL Dumps Before Snapshot

Copying raw /var/lib/postgresql files mid-write produces torn pages and broken WAL replay unless filesystem freeze hooks coordinate checkpoints. Always stream consistent point-in-time dumps via pg_dump or sqlite3 db.sqlite ".backup safe.sqlite" directly into stdin/staging before archiving.
Atomic Pre-Backup Database Dump Pipeline
pg_dump -Fc -U postgres prod_db > /tmp/prod_db.dump && restic backup /tmp/prod_db.dump && shred -u /tmp/prod_db.dump
sqlite3 /srv/data/app.db ".backup /tmp/app-consistent.db"

Guarantees transactionally consistent point-in-time recovery without database lock downtime.

4. An Untested Backup Is Schrรถdingerโ€™s Backup: Monthly Restore Drills

Schedule a monthly automated CI or sandbox check (`restic check --read-data-subset=5%` and actual `restic restore latest --target /tmp/verify`) verifying password availability, bucket keys, and checksum integrityโ€”because disaster recovery day is the worst possible time to discover a typo in your decryption passphrase.
๐Ÿ‘จโ€๐Ÿ’ป
Authored & Reviewed by ChrisMayPixels • Netherlands

Independent software developer focused on client-side architectures, local-first computing, WebAssembly, and privacy-first web systems.

About MayOnlineTools→

๐ŸŽ“Explore More Guides

โœจ