Storage & Backup Infrastructure

Backup Infrastructure Migration

Duration: ~8 hours Date: February 2026 Status: Production
TL;DR

Migrated from unreliable USB-based backups to Proxmox Backup Server with internal SATA drives. Backup jobs were failing roughly 40% of nights due to USB power management issues. Now a week of daily backups for 13 guests takes about 126 GiB on a 1TB drive, jobs run unattended, and a secondary node syncs a full copy every night.

Key Achievement: Jobs stopped failing. 98% storage reduction through deduplication (measured). Secondary node keeps a full copy in case the primary drive dies.
$ cat results.txt
failed nights
~40% → none since the migration
storage
6.2 TiB of backups in 126 GiB (98% less)
coverage
13 guests × 7 daily backups, copied nightly to a second node

The Problem

What I Started With

Why USB Storage Failed

Real-World Impact: A failed backup means no recovery option if something goes wrong. With 40% failure rate, I was essentially gambling every night that nothing would break.

The Solution

Architecture Overview

Migrated to Proxmox Backup Server (PBS) with a distributed architecture across two nodes:

                    PBS BACKUP ARCHITECTURE

┌─────────────────────────────────────────────────────────────┐
│                    PROXMOX CLUSTER                          │
│                                                             │
│   ┌─────────┐      ┌─────────┐      ┌─────────┐            │
│   │  pve01  │      │  pve02  │      │  pve03  │            │
│   │  VMs    │      │  VMs    │      │  VMs    │            │
│   └────┬────┘      └────┬────┘      └────┬────┘            │
│        │                │                │                  │
│        └────────────────┼────────────────┘                  │
│                         │                                   │
│                         ▼                                   │
│              ┌─────────────────────┐                        │
│              │   PBS Primary       │                        │
│              │   (pve01 - 1TB)     │                        │
│              │   Deduplication     │                        │
│              └──────────┬──────────┘                        │
│                         │                                   │
│                    Auto Sync                                │
│                    (2hr offset)                             │
│                         │                                   │
│                         ▼                                   │
│              ┌─────────────────────┐                        │
│              │   PBS Secondary     │                        │
│              │   (pve02 - 731GB)   │                        │
│              │   Redundant Copy    │                        │
│              └─────────────────────┘                        │
└─────────────────────────────────────────────────────────────┘
                

Key Components

Internal SATA Storage

Proxmox Backup Server

Automatic Replication

Deduplication Mechanics

Storage Comparison

Without Deduplication (Traditional)
Day 1: 100GB VM -> 100GB backup
Day 2: 100GB (2GB changed) -> 100GB
Day 3: 100GB (3GB changed) -> 100GB
Total: 300GB for 3 days
With PBS Deduplication
Day 1: 100GB VM -> 100GB chunks
Day 2: 100GB (2GB changed) -> +2GB
Day 3: 100GB (3GB changed) -> +3GB
Total: 105GB for 3 days
Savings: 65%
Real-World Results:
  • 420GB of live VM data
  • 1TB backup drive capacity
  • Before PBS: Could store 1-2 full backup rotations
  • After PBS: 7 daily backups of 13 guests use about 13% of the drive

The Challenges

Challenge 1: USB Disconnect During Migration
▼

Symptom:

rsync: failed to stat '/mnt/pve/exthdd/iso/ubuntu.iso': No such file or directory
External HDD mount point disappeared mid-migration

Root Cause:

  • USB drive power management put drive to sleep during large file copy
  • Mount path became stale
  • rsync encountered non-existent path

Solution:

  1. Disabled USB autosuspend temporarily:
    echo -1 > /sys/module/usbcore/parameters/autosuspend
  2. Used rsync with resume capability:
    rsync -av --partial --progress /source/ /dest/
  3. Monitored transfer with watch -n 1 df -h to detect disconnects immediately

Lesson Learned:

USB reliability issues aren't always obvious. Understanding Linux power management, mount lifecycle, and resilient copy strategies is essential for safe data migrations.

Challenge 2: PBS ACME Certificate Configuration
▼

Symptom:

ACME challenge failed: DNS TXT record not found

Root Cause:

  • PBS uses different ACME plugin format than PVE
  • Cloudflare API token needed specific permissions
  • DNS propagation delay caused initial failures

Solution:

  1. Created Cloudflare API token with Zone:DNS:Edit permissions
  2. Configured PBS ACME plugin with correct credentials
  3. Added delay to allow DNS propagation before verification

Lesson Learned:

Certificate automation requires understanding both the ACME protocol and your DNS provider's API. Different Proxmox products have slightly different configurations.

Challenge 3: Filesystem Tuning for Backup Workloads
▼

Symptom:

df shows less usable space than expected on 1TB drive

Root Cause:

  • ext4 reserves 5% for root by default (~50GB on 1TB)
  • Default inode ratio wastes space for large-file workloads

Solution:

# Reduce reserved blocks from 5% to 1%
tune2fs -m 1 /dev/sda1

# Verify alignment for optimal performance
blockdev --getalignoff /dev/sda1

Lesson Learned:

Understanding tunable parameters (reserved blocks, inode ratio, alignment) maximizes usable capacity for specific workloads.

Results

0
Failed Jobs Since Migration
98%
Storage Reduction
50x
Dedup Factor
2
Nodes with Full Copy
  • Backup jobs have been running clean since migration (was ~40% failure rate)
  • 98% storage reduction through chunk-level deduplication (measured October 2026)
  • Primary syncs to secondary nightly — if the drive fails, the other node has a full copy
  • 7 daily backups of every guest (keep-daily=7), with daily garbage collection
  • Nothing has needed manual intervention since it went live
  • Following 3-2-1 principles, working toward an offsite copy

Lessons Learned

Lesson 1: USB Storage Is Not Enterprise-Grade
▼

Observation: External USB drives are convenient for workstations but unsuitable for production backups.

Why:

  • USB power management can't be fully disabled
  • USB controllers add failure points
  • Sleep mode causes mount path instability
  • No inherent redundancy

Better Approach: Internal storage with proper enterprise features (RAID, hot-swap, monitoring).

Lesson 2: Deduplication Transforms Storage Economics
▼

Observation: PBS deduplication reduced storage requirements by 98%.

Measured (first garbage collection, October 2026):

  • 13 guests, 7 daily backups each
  • Logical backup data: 6.2 TiB
  • Actually on disk: 126 GiB
  • Dedup factor: 50.6x, so 98% savings

Impact: Can afford longer retention on smaller drives, improving disaster recovery capabilities.

Lesson 3: Node-Level Redundancy Is Essential
▼

Observation: Hardware fails. Single-instance backups are risky.

Scenario:

  • pve01's SATA drive fails (no warning)
  • Without sync: All backups lost
  • With sync: pve02 has complete copy, restore unaffected

Investment: Minimal (second HDD + cron job)
Protection: Maximum (complete backup redundancy)

The Short Version

I was running a 3-node Proxmox cluster with ~420GB of VM data backed up to a 4.5TB external USB drive shared via NFS. Backup jobs were failing roughly 40% of nights — the USB drive's power management would put it to sleep mid-backup, stale the NFS mount path, and in some cases cause VMs to shut down unexpectedly when they lost access to the mount mid-write. Single point of failure, no redundancy, and gambling every night that nothing would break. I migrated to Proxmox Backup Server with internal SATA drives: a 1TB drive on pve01 as the primary PBS instance with chunk-level deduplication, and a 1TB drive on pve02 partitioned as both a 200GB NFS share for ISOs and a 731GB PBS sync target. Primary syncs to secondary on a 2-hour offset from the backup window, giving full node-level redundancy if either drive fails.

Three things broke during the migration. The USB drive went to sleep mid-rsync during the initial data move — fixed by disabling autosuspend temporarily and using rsync --partial so interrupted transfers resume rather than restart. The ACME DNS-01 challenge for the PBS Let's Encrypt certificate kept failing because Cloudflare's DNS propagation takes time before Let's Encrypt can verify the TXT record — adding a delay and ensuring the API token had Zone:DNS:Edit scope fixed it. And the 1TB ext4 filesystem reported less usable space than expected because ext4 reserves 5% for root by default — about 50GB on a 1TB drive — which is designed for OS disks, not backup workloads. tune2fs -m 1 reclaimed most of it. Since deployment: 100% backup success rate and a measured 98% storage reduction through deduplication: 6.2 TiB of backups stored in 126 GiB on disk.