My homelab backs itself up every night with the Nightly Backup Loop: Home Assistant wakes my Proxmox Backup Server (PBS), Proxmox VE (PVE) backs up every container and VM to it, and PBS shuts down again. But PVE, PBS and the UNAS Pro that holds the datastore all sit in the same rack. A fire or a burglary takes the originals and the backups in one go, and since the Vaultwarden video that includes my family's passwords.

The 3-2-1 rule asks for three copies of your data, on at least two different devices, with one copy offsite. The third copy now lives at my parents' house, almost two hours' drive away, on a ZimaBoard 2 running its own PBS. This is the written companion to the video: the settings, permissions and commands to build it yourself, and the things that went wrong. The config files are in nightlyventures/configs.

Homelab rack with the Proxmox host, Proxmox Backup Server and UNAS Pro

PVE, PBS and the UNAS Pro share one rack.

Some links in this post are affiliate links. I may earn a small commission at no extra cost to you.

IceWhale sent me the ZimaBoard 2 NAS kit for free, and I get to keep it. This is not a paid post.

What we're building

A second PBS at another location that pulls a copy of the home PBS through a WireGuard tunnel. Home Assistant runs the whole night:

  1. At 03:00 it wakes the home PBS and starts the backup on PVE, as in the Nightly Backup Loop.

  2. PVE sends a webhook with the result. Anything other than a successful backup sends "Backup failed" to my phone.

  3. Home Assistant starts the sync job on the offsite PBS and checks that it ends with status OK.

  4. Home Assistant shuts the home PBS down.

  5. At 09:00 a second automation checks that the newest offsite backup is less than 26 hours old.

Three choices behind it:

  • Pull, not push. The offsite PBS fetches the backups. Nothing at home has write access to the offsite copy, so someone who gets into my home network can't delete it.

  • A second PBS, not a file target. It keeps deduplication, verify jobs and its own retention. My old Synology DS118 couldn't run PBS and has one bay, so no mirror.

  • WireGuard on the UniFi gateway. Tailscale or NetBird would work too, but I wanted a fixed tunnel on hardware I already manage, locked down by its firewall.

You need a working PBS at home (the Nightly Backup Loop post covers mine), a WireGuard server, and a second location with power, a network cable and a subnet that differs from your home network and the tunnel.

Hardware

  • Board: ZimaBoard 2 832 with an Intel N150, 8 GB of soldered RAM, 32 GB of eMMC, two 2.5 GbE ports, two SATA ports and a PCIe slot.

  • Kit: the Mini NAS Kit adds a bracket for two 3.5" drives, a PCIe riser with an NVMe adapter card, and a fan. Code nightlyventures_15 gives you $15 off.

  • Datastore: a WD Red Plus 4TB (WD40EFPX) and a Seagate IronWolf 4TB (ST4000VN006) in a ZFS mirror. Two brands on purpose: drives from the same production batch can fail at the same time.

  • Boot disk: a Klevv C715 256 GB NVMe, €52.90 at Megekko. For a boot disk the model doesn't matter much.

The 8 GB of RAM is soldered. With the ARC limit below it's plenty for PBS; for a bigger ZFS NAS, take the 1664 with 16 GB. The NVMe adapter card comes with a full-height bracket. The low-profile one is in the box, but the screws to swap them aren't. ZimaOS stays on the eMMC; PBS goes on the NVMe.

Drives connected to the ZimaBoard 2 SATA ports with the NVMe card in the riser

Both drives on the two SATA ports, NVMe card in the riser.

1. Install Proxmox Backup Server

  • In the BIOS (Delete key), turn on C-states and Enhanced C-states (C1E). They're off by default, and this box runs 24/7.

  • There's no "power on after power loss" setting, and you don't need one: the board has no power button and boots as soon as power returns. I tested it with a real power cut, and the WireGuard tunnel came back too.

  • Write the PBS 4.2 ISO to a USB stick with dd. balenaEtcher failed for me. If the stick doesn't show up, reboot with it in and pick it under Boot Override.

  • Install PBS on the NVMe with the defaults (ext4).

2. ZFS mirror and the ARC limit

In the PBS web interface, under Administration → Storage / Disks → ZFS, create a pool on the two drives:

  • Name: offsite

  • RAID Level: Mirror. It defaults to Single Disk.

  • Compression on, ashift 12, Add as Datastore enabled.

That gives 4 TB usable. ZFS uses up to half the RAM for its read cache (the ARC) by default. Backups are rarely read back, so cap it at 3 GB and leave the rest for sync, verify and garbage collection:

echo "options zfs zfs_arc_max=3221225472" > /etc/modprobe.d/zfs.conf
update-initramfs -u && reboot
Setting the ZFS ARC limit

3. WireGuard tunnel

On the UniFi gateway, add a client called pbs-offsite to the WireGuard server, press Apply and download its config. Without Apply there's no handshake, and WireGuard gives no error at all.

Put the config in /etc/wireguard/wg0.conf on the offsite PBS and change three things:

  • Remove the DNS line. PBS has no resolvconf, and wg-quick fails on it.

  • Change AllowedIPs from 0.0.0.0/0 to the home addresses, so only traffic for home goes through the tunnel.

  • Add PersistentKeepalive = 25, so the tunnel stays up from behind the other router.

chmod 600 /etc/wireguard/wg0.conf
systemctl enable --now wg-quick@wg0

While the box is still on your home network, list single /32 addresses in AllowedIPs. With the whole home /24 in there, it sends its own LAN into the tunnel and you lose SSH. Switch to the /24 just before it leaves. The template with both variants is wg0.conf.example in the repo.

4. UniFi firewall rules

The offsite PBS doesn't need to reach my whole network, and my network doesn't need to reach it. In UniFi's zone-based firewall, four allow rules, all matching the tunnel address of the offsite PBS:

  • Offsite PBS → home PBS, TCP 8007, for the sync

  • Home Assistant → offsite PBS, TCP 8007, to start the sync and check it

  • PVE → offsite PBS, TCP 8007, for restores

  • My Mac → offsite PBS, TCP 8007 and 22, for management

Two block rules stop everything else, one in each direction. The full table is unifi-firewall.md in the repo. Two catches:

  • Set the block rules to Connection State New. With All, they also block the replies to the traffic you just allowed.

  • The policy table sorts by name, not by evaluation order. The real order is the ID column, lowest first. If reordering doesn't work, delete and recreate the block rule: a new rule gets the highest ID.

5. Users and tokens

Three tokens, each with only what it needs:

  • sync@pbs!offsite on the home PBS: DatastoreReader on the home datastore. The offsite PBS uses it to pull.

  • ha@pbs!trigger on the offsite PBS: DatastoreBackup and DatastoreAudit on /datastore/offsite, RemoteSyncOperator on /remote. Home Assistant uses it to start the sync and read the result.

  • pve@pbs!restore on the offsite PBS: DatastoreReader on the offsite datastore. PVE uses it for restores, so it can read the offsite copy but can't change or delete anything.

With privilege separation, a token only gets what its user also has, so add each permission to the user and to the token.

Sync token permissions in Proxmox Backup Server

6. Pull sync job and retention

On the offsite PBS:

  • Remote: home, the home PBS by hostname, with the sync@pbs!offsite token and an empty fingerprint. That only works if the home PBS has a certificate from a public CA such as Let's Encrypt; see "Things that go wrong" for why I don't pin it.

  • Sync job: from home into offsite, Remove vanished off, so backups deleted at home stay offsite. No schedule: Home Assistant starts it.

  • Prune: daily, keep-daily 14, keep-weekly 8, keep-monthly 12.

  • Garbage collection: daily.

  • Verify: every Sunday, re-verify after 30 days.

Do the first copy over the LAN, before the box leaves the house. Mine was 585 GiB and 4092 snapshots in 2 hours and 48 minutes. After that, a nightly sync takes 1 to 3 minutes. After prune and garbage collection, 337 GB of the 3.86 TB is in use.

Sync task log in Proxmox Backup Server

7. Home Assistant: trigger and monitoring

The REST commands and both automations are in the repo (configuration.yaml and automations.yaml), with placeholders. What they add to the Nightly Backup Loop:

  • Backup result. The hass-backup webhook target in PVE sends the backup's severity in a JSON body: info for a good backup, error for a failed one. Without it, Home Assistant can't tell them apart, because PVE sends the webhook in both cases. The body template is in hass-backup-webhook.md; its double curly braces don't survive in this post.

  • Offsite sync. rest_command.pbs_offsite_sync posts to /api2/json/admin/sync/SYNC_JOB_ID/run on the offsite PBS. The job ID goes in the path, not in the payload. The automation then reads the task status and notifies me unless it ends with OK.

  • Freshness check. A second automation runs every morning at 09:00 and asks the offsite PBS for the newest backup across all groups. Older than 26 hours means "Backups are stale"; no answer means "Offsite PBS unreachable".

Why the freshness check works the way it does:

  • One check covers home and offsite: a synced snapshot keeps the backup time of the original.

  • It takes the newest snapshot across all groups, not per group. Remove vanished is off, so groups of deleted containers keep their old date and would alert every day.

  • 26 hours, because at 09:00 the newest snapshot is normally about 6 hours old. One missed night makes it 30.

Backup freshness check automation in Home Assistant
Stale backup notification on a phone

A stale-backup alert on my phone.

8. Moving it offsite

Test the whole chain at home first, through the same tunnel it will use from the other location. Then, before you pack it:

  • Switch it from a static IP to DHCP.

  • Add 9.9.9.9 as a fallback DNS server, so it can always find the tunnel endpoint.

  • Change AllowedIPs to the home /24.

  • Check that the other network doesn't use the same subnet as your home network or the tunnel.

  • Power it off.

At the other end it needs power and one network cable. Mine has been running at my parents' house without problems since.

9. Test a restore

A backup you haven't restored from is a hope, not a backup. In PVE, add the offsite PBS as a second PBS storage, offsite, with the pve@pbs!restore token. This one does pin the fingerprint, because the offsite PBS keeps its self-signed certificate.

I restored my Vaultwarden container (CT 125, 211 MiB) as CT 925 in 8.7 seconds. A restored container keeps the IP, hostname and Start at boot setting of the original, so disconnect its network and turn Start at boot off before you start it. Otherwise you have two Vaultwardens fighting over one IP.

Restoring Vaultwarden from the offsite copy as CT 925

Things that go wrong

The one that hurt: my home PBS had switched to a Let's Encrypt certificate, while PVE still had the old fingerprint pinned. From then on every backup stopped within a second with fingerprint ... not verified, abort!. PVE still sent the webhook, so Home Assistant shut PBS down every night as if all was fine, and I never saw PVE's warning mails. I only found out weeks later, when the first offsite sync came back incomplete.

The fix is to connect by hostname and leave the fingerprint empty, so PVE checks the certificate against its CA and a renewal doesn't break anything. The Server field of a PBS storage can't be changed in the PVE web interface, so edit /etc/pve/storage.cfg (example in the repo). The remote on the offsite PBS needs the same change. The first run after the fix backed up 30 guests in 17 minutes, followed by a 22.5-minute sync to catch up on the missed weeks.

Failed backup jobs in Proxmox VE

The rest, in short:

  • Home Assistant sends application/octet-stream unless you set content_type. PBS then rejects the call without starting a task, and Home Assistant only says the answer "could not be decoded as JSON".

  • The PBS token header has a colon before the secret (PBSAPIToken=ha@pbs!trigger:SECRET). PVE uses an equals sign.

  • Without RemoteSyncOperator on /remote, starting the sync fails with "permission check failed".

  • Backup groups that already exist under another owner fail the owner check on the first sync. Use Change Owner on those groups.

  • The firewall is only half of it: a device reaches the offsite PBS through the tunnel only if its address is also in AllowedIPs.

Power

With both drives spinning, the ZimaBoard idles at 13.4 to 13.9 W. During the big catch-up sync it averaged 21.4 W, with a peak of 31 W, measured with a Zigbee plug in Home Assistant. That's about 120 kWh a year. A power schedule would save little at this draw, and one missed power-on means a two-hour drive, so it runs 24/7.

Power usage graph of the ZimaBoard in Home Assistant

Result

The finished ZimaBoard 2 offsite backup server

Three copies, on three devices, in two houses. If my house burns down, I drive to my parents, pick up the ZimaBoard and restore onto a new Proxmox host.

The WireGuard template, the ZFS setting, the firewall rules, the PVE storage blocks and the Home Assistant automations are in nightlyventures/configs, with placeholders for addresses and tokens.

Tested on Proxmox Backup Server 4.2 (ZimaBoard) and 4.1 (home), Proxmox VE 9.2 and Home Assistant 2026.11.