Every backup looks healthy right up until you open the schedule table on a Tuesday night and realize half your production fleet has zero snapshots. While auditing my own bare-metal Proxmox Virtual Environment hypervisor powering my Coqui Cloud services and RamonRios.NET applications, I uncovered an uncomfortable truth: only one database had automated off-site dumps, Proxmox itself had zero scheduled vzdump jobs in /etc/pve/jobs.cfg, and six active virtual machines had never been snapshotted once. Rather than buying an expensive enterprise backup appliance, I engineered a declarative Terraform and GPG-encrypted 3-2-1-1-0 disaster recovery pipeline that verifies every restore automatically every night for zero marginal dollars per month.
Most infrastructure teams treat disaster recovery as an afterthought bolted onto an already busy hypervisor. Someone exports a manual database dump before a risky upgrade, saves a zip archive into a root home directory, and hopes the RAID mirror never fails at the same time as a bad deployment. Worse still, when teams do schedule nightly scripts, they rarely verify whether the encrypted tarball can actually be decrypted or restored cleanly into PostgreSQL under pressure.
Curious how far I could push enterprise resilience using purely open-source tooling and storage I already owned, I spent an evening tearing down every vulnerability across my eight-VM production fleet, covering ERP database clusters, multi-tenant password vaults, container reverse proxies, mail gateways, and the Proxmox bare-metal host configuration itself. What emerged was a four-layer Architecture Decision Record combining Terraform Infrastructure-as-Code, client-side GnuPG encryption, live QEMU guest-agent snapshots, and automated PostgreSQL restore drills.
The Sobering Audit Discovery: Six active virtual machines carried zero bare-metal snapshots, one host firewall was inactive, and the hypervisor's intrusion prevention service had silently failed on Debian 12 because its default configuration looked for legacy log files instead of systemd journal entries. Auditing assumptions beats discovering them during an outage.
Why Standard 3-2-1 Backups Still Fail Under Stress
Classic IT playbooks recite the 3-2-1 rule by heart: keep three copies of data on two different media types, with one copy stored off-site. In 2026, two extra realities break naive 3-2-1 setups every single week:
- Unencrypted Cloud Copies Expand Your Blast Radius: Pushing raw SQL dumps, TLS private keys, or configuration directories straight to consumer cloud drives means any compromised OAuth session hands an attacker your entire production state in plaintext.
- Untested Archives Are Schrodinger's Backups: A cron job that returns exit code zero because
pg_dumpwrote a zero-byte file, or an encrypted archive generated with the wrong passphrase, feels green right until disaster strikes.
Adding the final two digits turns 3-2-1 into the modern 3-2-1-1-0 standard: 1 zero-knowledge encrypted/offline-key copy and 0 untested backup errors verified automatically on every run.
A backup job that never performs an automated decrypt and database restore test is just an optimistic file-copy script burning disk space.
Mapping Every Layer of the 3-2-1-1-0 Pipeline
Instead of installing proprietary backup agents inside eight virtual machines, I split resilience into four clean layers across infrastructure definitions, host snapshots, client-side cryptography, and off-site streaming. You can also explore how I surface live backup status metrics inside my open-source engineering showcase and verify perimeter exposure with our edge security posture scanner.
Terraform Proxmox Spec
All eight production VMs plus sanitized Caddy, Docker Compose, and systemd blueprints live inside a private GitHub repository using the bpg/proxmox provider with prevent_destroy = true lifecycle guards.
Zero-Knowledge GPG
Every PostgreSQL dump, Passbolt vault export, mail gateway backup, and hypervisor snapshot is compressed with zstd and encrypted locally with AES-256, SHA-512, and 65 million S2K Mode 3 iterations before egress.
Automated Restore Drill
Every daily cycle decrypts the primary database bundle, validates thousands of pg_restore --list TOC entries, restores into an ephemeral scratch database, asserts row counts, and tears down cleanly.
Step 1: Freezing All 8 VMs and Runtime Blueprints in Terraform
Recovering data without the machine topology that hosted it wastes hours reconstructing bridge names, vCPU counts, disk layouts, and reverse proxy routes. Previously, only Cloudflare DNS for my personal domain sat inside Terraform. None of the eight production Proxmox guests, spanning ERP application nodes, multi-tenant password vaults, utility containers, dedicated mail stacks, and isolated web nodes, had declarative definitions.
I created a reusable Proxmox VM Terraform module enforcing three non-negotiable defaults across every guest:
Lifecycle Destruction Guard: Every production VM declares prevent_destroy = true so no accidental refactor can wipe an active compute guest.
Explicit Bridge vs. PVE Firewall Alignment: Setting firewall = false on virtual NICs avoids silent packet drops caused by unconfigured Proxmox bridge firewall defaults when guest-level UFW rules already govern ingress.
QEMU Guest Agent Enabled: Enabling agent.enabled = true gives the hypervisor native fs-freeze and fs-thaw hooks so weekly vzdump snapshots stay crash-consistent with zero downtime.
Alongside Terraform, a small sanitizer script exports live runtime blueprints, every active Docker Compose file, Caddy reverse proxy rule, systemd unit, and cron schedule, into Git after stripping tokens and credentials, keeping architecture reproducible without violating zero-secret repository hygiene.
Step 2: Client-Side GPG AES-256 Encryption & Three-Tier Schedules
Because my existing Google Workspace subscription includes a 20 TB Google Drive pool already paid for, the marginal cost of off-site object storage drops to exactly zero, provided the cloud provider never sees a single unencrypted byte. Before any file touches the network, the backup engine runs client-side encryption using an offline 64-character recovery key stored strictly in hardened local storage (chmod 600) and an offline password vault:
tar --zstd -cf - "${TARGET_DIR}" \
| gpg --batch --yes --symmetric \
--cipher-algo AES256 \
--digest-algo SHA512 \
--s2k-mode 3 \
--s2k-count 65011712 \
--passphrase-file /home/ops/.secrets/dr_backup.key \
-o "${OUT_PATH}.tar.zst.gpg"
Notice two subtle design choices here. First, streaming through tar --zstd into gpg eliminates staging massive plaintext archives on disk. Second, forcing 65,011,712 S2K Mode 3 iterations makes brute-force decryption computationally prohibitive even if someone captures an off-site cloud archive.
To balance recovery point objectives against bandwidth limits (such as Google Drive's 750 GB daily upload cap), I split execution across three distinct cadences:
| Backup Tier | Schedule & Trigger | Covered Scope | Retention & RPO / RTO |
|---|---|---|---|
| Tier 1: Daily Encrypted Core | Daily 02:15 MST | All 11 PostgreSQL clusters (80+ DBs across two nodes), custom addons, Docker configs, Passbolt vaults, Mail Gateway config, and Proxmox Base Host /etc/pve + partition maps + package list. |
7d local NVMe + 30d Drive; RPO 24h, RTO 5–15 min per DB. |
| Tier 2: Bare-Metal Local Snapshots | Sat / Sun 04:00 | Staggered live QEMU guest-agent vzdump (mode=snapshot, zstd) across all 8 active VMs (~190 GB compressed baseline, zero guest downtime). |
keep-last=1 local hypervisor NVMe; RTO 10–25 min per VM. |
| Tier 3: Weekly Filestores & Off-Site VM Stream | Sun 03:30 & Mon 03:00 MST | Streaming Docker filestore volumes (8-week Drive retention) plus sequential smallest-to-largest encrypted bare-metal .vma.zst.gpg upload with immediate local temp cleanup. |
28d bare-metal Drive vault; survives total bare-metal hardware loss. |
That smallest-to-largest Monday ordering (from a 1.39 GB web guest up to the largest 113.64 GB primary application VM) matters in practice: even if a datacenter outage or bandwidth hiccup interrupts the Monday run halfway through, the lightest critical infrastructure—vault, mail gateway, and reverse proxy VMs—already sits safely off-site before the heaviest disk image finishes streaming.
Step 3: Automating the "-0" Daily Restore Verification Drill
Most DIY backup scripts stop once a file uploads, skipping where the -0 in 3-2-1-1-0 earns its keep. Every single daily run executes an automated non-destructive verification phase before reporting success:
- Real Decryption Proof: The script invokes
gpg --decryptagainst the newly generatedlive20-db.tar.zst.gpgarchive using the local key file, proving the archive is readable and mathematically intact. - Dump Table-of-Contents Validation: It runs
pg_restore --listagainst the primary database dump, verifying more than 14,400 catalog entries without corruption. - Live Scratch Cluster Restore: It spins up an isolated
dr_verify_scratchdatabase inside PostgreSQL, executes a full restore of a real production commerce database, queries installed module counts (160+) and active catalog rows to confirm application integrity, and drops the scratch database cleanly.
When that verification completed in 246 seconds total for 16 encrypted archives (1.32 GB across all 11 database clusters, host OS configs, and vaults) alongside a clean 38-second live restore drill, I knew with empirical proof—not hope—that the recovery chain worked end to end.
Step 4: Closing the Host Hardening Gaps Found During Audit
Resilient backups cannot defend a wide-open SSH port. The same audit uncovered a sneaky Ubuntu cloud-image configuration trap: drop-in file /etc/ssh/sshd_config.d/50-cloud-init.conf silently sets PasswordAuthentication yes at a higher alphabetical priority than lower-numbered config fragments unless your hardening drop-in explicitly wins lexicographically or sits at 01-coqui-hardening.conf / 99-coqui-hardening.conf depending on OS inclusion order. Always confirm live daemon behavior with sshd -T rather than eyeballing one file.
Across the hypervisor and every guest, I enforced key-only SSH (PasswordAuthentication no, MaxAuthTries 4), enabled guest UFW default-deny rules, and patched Debian 12 fail2ban by setting backend = systemd so brute-force jails actually started reading journald streams again. You can estimate how consolidating commercial backup SaaS licenses and managed appliances impacts annual IT budgets using our interactive CoquiAudit FinOps ROI Calculator.
FinOps Impact: Zero Marginal Spend vs. SaaS Backup Tax
Commercial cloud backup agents charging per VM, per gigabyte of warm storage, and per database plugin easily add $250 to $600 per month across an eight-VM mixed Linux/Docker/PostgreSQL fleet. By pairing open-source Proxmox snapshots, standard GnuPG cryptography, Python orchestration, and existing 20 TB cloud storage, the monthly marginal cost stays $0.00/mo while preserving complete data sovereignty—no vendor lock-in, no third-party key custody, and zero unverified archives.
In Part 2 of this series, I move up a layer into application delivery and inspect how we stopped accidental API keys and passwords from ever entering Git history across multi-client repositories using a zero-knowledge SHA-256 secret guard.
Inspect Your Recovery & Edge Posture: Check your public TLS and header hygiene with our CoquiScanner tool, calculate infrastructure savings on CoquiAudit FinOps, or browse lightweight Windows utilities like GDocsDrop and PasteRich across our portfolio showcase.
Sovereign Infrastructure & Operations Series (Parts 1–3)
- Part 1 (You Are Here): Zero-Dollar Sovereign 3-2-1-1-0 Disaster Recovery: Encrypting Proxmox, PostgreSQL, and Bare-Metal Fleets Into Cloud Storage
- Part 2: Zero-Knowledge Secret Guard: Stopping Leaked API Keys Across Multi-Repo Git Fleets Without Committing Plaintext Rules
- Part 3: Exiting Legacy cPanel/WHM Reseller Hosting: Migrating 28 Client Accounts to Sovereign CloudPanel, Mailcow, and Triple-HA Cloudflare Tunnels
Explore live tools & builds: GDocsDrop · PasteRich · CoquiScanner · CoquiAudit FinOps · Portfolio Showcase