Skip to content

🗄️ PBS Integration, NFS Mounting & Backup Sync Architecture ​

The Proxmox Backup Server (PBS, 192.168.0.103) provides deduplicated, snapshot-based backups for all VM and LXC guests across the cluster.


⚡ 1. Automated Power Lifecycle & Sunday Backup Pipeline ​

To minimize energy consumption and hardware wear, PBS does not run 24/7. Instead, it operates on a fully automated weekly wake-backup-sleep lifecycle orchestrated between Home Assistant, the PBS host, and the Proxmox VE cluster.

Key Workflow Components: ​

1. Home Assistant Power-On Automation ([PBS] Sunday 00:45 check & power-cycle if off) ​

  • Entity: automation.pbs_sunday_00_45_check_power_cycle_if_off
  • Trigger: Every Sunday at 00:45:00
  • Logic:
    • Reads sensor.power_plug_1_pbs_power.
    • If power is $< 1\text{ W}$, turns switch.power_plug_1_pbs OFF for 60 seconds, then ON.
    • The PBS motherboard BIOS is configured to Power On upon AC Power Loss Restoration, automatically booting the server.
    • Sends a push notification to notify.mobile_app_iphone16.

2. Proxmox Cluster Scheduled Backup Job (sun 01:00) ​

  • Job ID: backup-3c3a3aa9-ccb3
  • Schedule: sun 01:00 (Sunday at 01:00 AM, 15 minutes after PBS boots).
  • Target Storage: backup (PBS datastore backup@pbs).
  • Mode: snapshot with repeat-missed: 1.
  • Target Guests: All VMs and LXCs (100, 129, 131, 132, 133, 180, 181, 182, 183, 185, 199, 200).
  • Retention: keep-last: 2.

3. PBS 3-Hour Boot Timer & Active Job Guard ​

  • PBS is configured with an automated shutdown timer (~3 hours after boot).
  • Job Delay Guard: If any active backup transfers, verify jobs, garbage collection, or sync operations are still in progress when the timer fires, the power-off is postponed until all active tasks complete cleanly.
  • When idle, PBS executes a graceful OS shutdown (poweroff).

4. Home Assistant Standby Power Cutoff ([PBS] Switch off PBS power plug if W below 1) ​

  • Entity: automation.pbs_switch_off_pbs_power_plug_if_w_below_1
  • Triggers:
    • sensor.power_plug_1_pbs_power drops below $2\text{ W}$ for 1 hour (for: 01:00:00).
    • Scheduled catch-all trigger on Monday at 05:55:00.
  • Condition: switch.power_plug_1_pbs is on AND binary_sensor.pbs_local is off (host is offline).
  • Action: Turns switch.power_plug_1_pbs OFF, eliminating phantom power draw and re-arming the plug for the next Sunday power-on cycle.

📂 2. Mounting tank/media_root onto PBS via NFS ​

Because PVE-1 exports /mnt/pve/tank_media to 192.168.0.0/24, PBS is authorized to mount mass storage for file access, script offloading, or archive copying.

Mounting Steps (On PBS Host 192.168.0.103): ​

bash
# 1. Install NFS client tools
apt-get update && apt-get install -y nfs-common

# 2. Create target mount directory and symlink
mkdir -p /mnt/pve/tank_media
ln -sfn /mnt/pve/tank_media /tank/media_root

# 3. Mount NFS share
mount -t nfs4 192.168.0.100:/mnt/pve/tank_media /mnt/pve/tank_media

# 4. Make persistent in /etc/fstab:
echo "192.168.0.100:/mnt/pve/tank_media /mnt/pve/tank_media nfs4 _netdev,x-systemd.automount,auto,nofail,soft,timeo=50,retrans=2 0 0" >> /etc/fstab

⚡ 3. Backup Sync Storage Architectures & Best Practices (PBS 4.2) ​

WARNING

Why Raw NFS is Discouraged as a PBS Datastore: Proxmox strongly discourages configuring a PBS Datastore directly over an NFS mount. PBS uses a content-addressed chunk store (millions of small 4MB chunk files hashed with SHA-256) requiring high-frequency atomic renames, POSIX lock synchronization, and low-latency chunk validation. Over NFS, network latency and lock contention cause task timeouts, slow verify jobs, and potential chunk verify errors.

Approach A: Run a Second PBS Instance on PVE-1 (Gold Standard 3-2-1 Topology) ​

Instead of mounting NFS on PBS, run a lightweight PBS instance (in an unprivileged LXC or small VM) locally on PVE-1:

  1. Mount a dedicated dataset on tank (tank/pbs_datastore) natively into the local PBS instance.
  2. Configure a native PBS Sync Job (pull or push) between the primary PBS (192.168.0.103) and the local PVE-1 PBS instance.
  3. Benefits:
    • Native Performance: Chunks are written to local ZFS with zero network filesystem lock overhead.
    • PBS 4.2 Optimization: Leverages multi-threaded concurrent group sync (worker-threads), server-side encryption for push sync, and namespace synchronization.
    • Disaster Recovery: If the standalone PBS hardware (192.168.0.103) fails, PVE-1 has an independent, fully functioning PBS instance with local backup copies ready for instant restores.

Approach B: PBS 4.2 S3-Compatible Object Store Backend ​

Proxmox Backup Server 4.2 officially supports S3-compatible object stores as a backup datastore backend:

  1. Run a lightweight S3 object store server (e.g. MinIO or Garage) on PVE-1 backed by tank.
  2. Configure PBS 4.2 to use the S3 endpoint for secondary datastore sync.
  3. Benefits: PBS manages its own local chunk caching, request statistics, traffic monitoring, and rate limiting natively over S3 API.

Approach C: Block-Level Target via iSCSI (ZFS zvol) ​

If you want the primary PBS server to have direct block access without a second PBS instance:

  1. Create a ZFS block device (zvol) on tank:
    bash
    zfs create -V 2T tank/pbs_sync_vol
  2. Export it via iSCSI (targetcli / LIO) from PVE-1 to PBS (192.168.0.103).
  3. Format it on PBS with ext4 or XFS and add it as a native secondary datastore. This bypasses NFS file locking completely.

🛡️ 4. Global 3-2-1 Homelab Backup & Disaster Recovery Matrix ​

The homelab enforces a multi-tier backup strategy distributing live workloads, local backups, and encrypted offsite copies across independent cloud and hardware targets:

Workload / Data TierBackup Tool / EngineSchedule & RetentionPrimary TargetOffsite Cloud TargetEncryption & Security
All VMs & LXC ContainersProxmox vzdumpWeekly (Sunday 01:00 AM)
Retention: keep-last: 2
Dedicated PBS Server (192.168.0.103)Offline / Stored on PBS DatastoreNative PBS deduplication & chunk validation
Proxmox Host Node OS ConfigsproxsaveDaily automatedLocal Node StorageGoogle DriveClient-side encrypted before cloud upload
Home Assistant OS (VM 199)Home Assistant Built-in BackupEvery 2 daysLocal StorageGoogle DrivePassword-protected encrypted archives
Immich Photo LibraryBackrest (Restic v1.13.0)Daily at 01:01 AM
24h / 30d / 12m
Live ZFS tank/media_rootHetzner Storage Box BX11 (1TB via SFTP)Restic AES-256 encrypted + Healthchecks.io alerts
Offline Cold Storage (Photos & Dumps)Automated rsync via udev & systemdMonthly (on physical insertion)2TB WD HDD (WD-WXL1EC84X4KR)Air-gapped offline storageTelegram alerts, safe unmount & auto-spindown

Authoritative operational repository and DR hub.