Skip to main content
RunBook Academy

Proxmox VEXIV · Disaster RecoveryDR architecture

Disaster recovery for the backup server itself

Advanced⏱ ~28 minproxmox-backup-managerproxmox-backup-client

What you'll learn

  • State precisely what is lost when a PBS host dies and what survives on its datastore
  • Choose between pull and push sync for a DR replica, on the ransomware argument rather than convenience
  • Rebuild a PBS host onto new hardware and re-adopt an existing datastore
  • Design key escrow so an encrypted datastore is recoverable without the cluster that created it

Prerequisites

Verified against Proxmox VE 9.2.4 · Proxmox Backup Server 4.2.5 · Ceph Squid / Tentacle · Debian 13 (Trixie) · Linux kernel 7.0 (PVE 9.2 default) · 2026-08-12

Not yet marked complete on this device.

Draw the dependency graph of your recovery plan. Every guest restore, every file-level recovery, every ransomware response and the platform rebuild from the previous lesson all have an arrow pointing at one box: the backup server.

Now ask what happens to that graph if the box is gone. On most estates the answer is that every arrow terminates in nothing, and this is rarely written down anywhere, because the backup server is the thing that protects other things and the question of what protects it does not naturally arise.

What is actually lost

Not everything, and knowing the split determines the recovery.

ComponentWhere it livesLost with the host?
Chunk store and indexesThe datastore filesystemNo if the storage survives
Datastore definitions/etc/proxmox-backup/datastore.cfgYes
Users, ACLs, API tokens/etc/proxmox-backup/user.cfg, acl.cfgYes
Remotes and sync jobsremote.cfg, sync.cfgYes
Prune, GC and verify schedulesprune.cfg, verification.cfgYes
Server certificates and fingerprint/etc/proxmox-backup/proxy.{pem,key}Yes
Tape configuration, if usedtape.cfg, media-pool.cfgYes
Encryption keysClient-side; PVE holds them in /etc/pve/priv/storage/Not PBS’s to lose, and the worst thing to lose

The pattern: the data is on the disks, the ability to use it is in /etc/proxmox-backup/. That directory is small. Backing it up is the single highest-value action in this lesson, and it takes one line.

Read-only / Safecapture the PBS server configuration
set -euo pipefail
STAGE="/root/pbs-config-$(hostname -s)-$(date +%F)"
mkdir -p "$STAGE"; chmod 700 "$STAGE"

tar czf "$STAGE/etc-proxmox-backup.tar.gz" -C / etc/proxmox-backup

# Host-level state a rebuild needs.
tar czf "$STAGE/etc-host.tar.gz" -C / \
etc/network/interfaces etc/hosts etc/hostname etc/ssh 2>/dev/null || true

# How the datastore was assembled - not reconstructible from the chunks.
lsblk -o NAME,SIZE,TYPE,FSTYPE,UUID,SERIAL > "$STAGE/lsblk.txt"
zpool status                               > "$STAGE/zpool.txt" 2>/dev/null || true
findmnt -no TARGET,SOURCE,FSTYPE           > "$STAGE/mounts.txt"
dpkg -l 'proxmox-backup*' 'pbs-*'          > "$STAGE/versions.txt"
proxmox-backup-manager cert info           > "$STAGE/cert.txt"

ls -la "$STAGE"

PBS-to-PBS sync as the DR mechanism

The datastore itself is protected by replicating it to a second PBS server, and PBS supports sync in both directions. The choice between them is a security decision, not a networking one.

Pull: the DR server fetches

Configuration changepull sync - configured and run on the DR server
set -euo pipefail

# On the PRIMARY, get the fingerprint the DR server must trust.
# proxmox-backup-manager cert info | grep -i fingerprint

# On the DR server:
proxmox-backup-manager remote create pbs-primary \
--host pbs1.example.com \
--auth-id sync@pbs \
--password 'REPLACE_ME' \
--fingerprint 'REPLACE_WITH_PRIMARY_FINGERPRINT'

proxmox-backup-manager sync-job create dr-pull \
--remote pbs-primary \
--remote-store main \
--store dr-main \
--schedule 'hourly' \
--remove-vanished false

proxmox-backup-manager sync-job list

Push: the primary sends

Configuration changepush sync - configured and run on the primary
set -euo pipefail

proxmox-backup-manager remote create pbs-dr \
--host pbs-dr.example.com \
--auth-id 'push-main@pbs' \
--password 'REPLACE_ME' \
--fingerprint 'REPLACE_WITH_DR_FINGERPRINT'

proxmox-backup-manager sync-job create dr-push \
--remote pbs-dr \
--remote-store dr-main \
--store main \
--sync-direction push \
--schedule 'hourly'

proxmox-backup-manager sync-job list

Key escrow: the part with no support path

If your backups are encrypted - and they should be, particularly offsite - then the key is a component of the recovery system, and it is the only one with no fallback whatsoever.

PBS provides a master-key mechanism for exactly this, and it is the piece most estates skip.

Configuration changecreate a master key pair and enrol it
set -euo pipefail

# Creates master-public.pem and master-private.pem in the current directory.
proxmox-backup-client key create-master-key

# Tell the client to wrap each new backup key with the master public key.
proxmox-backup-client key import-master-pubkey ./master-public.pem

ls -l master-public.pem master-private.pem
Read-only / Safeproduce a paper backup of a key
set -euo pipefail

proxmox-backup-client key paperkey \
--output-format text /etc/proxmox-backup/encryption-key.json \
> /root/paperkey.txt

wc -l /root/paperkey.txt
# print it, then:
# shred -u /root/paperkey.txt
Data-loss riskrecover a backup key using the master private key
set -euo pipefail

proxmox-backup-client key import-with-master-key /root/recovered.key \
--master-keyfile /media/escrow/master-private.pem \
--encrypted-keyfile /root/rsa-encrypted.key

ls -l /root/recovered.key

A workable escrow design, stated as requirements rather than products:

RequirementWhy
The master private key exists on media that is not any running systemSo a compromise of the estate does not include it
At least two copies, at two addressesOne safe, one fire
A paper key as the last resortMedia fails silently over years; paper does not
Two people needed to retrieve itSo one person’s departure or compromise is not decisive
An annual test that reads a backup using only escrowed materialBecause untested escrow is a belief, not a control

That last row is the one that finds the problem. The commonest escrow defect is not a lost key; it is a key that was rotated on the systems and never re-escrowed, so the safe holds a key that decrypts nothing made in the last two years.

Rebuilding a PBS host

Datastore disks survived - a dead motherboard, a failed boot device:

  1. Install PBS fresh, matching the previous version from versions.txt.
  2. Restore host networking, hostname and /etc/hosts.
  3. Attach the datastore storage; confirm the filesystem mounts and the chunk store directory is intact.
  4. Restore /etc/proxmox-backup/ from the config archive.
  5. Restart proxmox-backup-proxy and proxmox-backup.
  6. Verify before announcing it is back.
Configuration changere-adopt an existing datastore on a rebuilt host
set -euo pipefail
DSPATH=/mnt/datastore/main

# The chunk store must be there before you define anything.
test -d "$DSPATH/.chunks" || { echo 'no chunk store at that path'; exit 1; }

proxmox-backup-manager datastore create main "$DSPATH"
proxmox-backup-manager datastore list

# Prove the content is real, not merely present.
proxmox-backup-client snapshot list --repository 'root@pam@localhost:main' | head

Then start a verification of the whole datastore - from the web interface, or by scheduling a verify job - and wait for it to finish before telling anyone the backup server is back. A datastore that lists snapshots has an intact index; only a verify pass recomputes the chunk digests and proves the data behind them survived whatever killed the host.

Datastore disks lost as well - the DR server is now the primary:

  1. Point the PVE cluster’s storage definition at the DR PBS server. Its fingerprint differs, so the storage entry must be updated, and this is where the printed fingerprint from the platform backup earns its keep.
  2. Restore what you need directly from the DR datastore. It is a complete restore source; there is no rehydration step.
  3. Build the replacement primary, and reverse the sync so the rebuilt server pulls from the DR server.
  4. Reverse it back only once the new primary has a verified, complete datastore.

Step 3 is the one that gets skipped under pressure, and skipping it means running with a single copy for however long the rebuild takes - which is precisely the condition that just cost you a server.

Verification

Read-only / Safequarterly: prove the DR backup server can stand alone
set -euo pipefail
export PBS_REPOSITORY='restore@pbs@pbs-dr.example.com:dr-main'

# 1. It is reachable and its fingerprint is what your documentation says.
proxmox-backup-manager cert info | grep -i fingerprint

# 2. It holds recent snapshots, not just old ones.
proxmox-backup-client snapshot list | tail -10

# 3. Its own verify job ran recently and passed - separate disks, separate
#    failure modes from the primary, so the primary's results say nothing.
proxmox-backup-manager task list --limit 20

# 4. A restore actually works using only DR-side credentials and the
#    escrowed key. This is the step that makes the other three meaningful.
proxmox-backup-client restore \
'vm/9001/2026-08-11T02:00:00Z' drive-scsi0.img.fidx /srv/scratch/dr-test.raw \
--keyfile /media/escrow/recovered.key

Step 4 is the whole exercise. Steps 1 to 3 confirm the DR server exists and its data is intact; only step 4 confirms that you can get data out of it, with the credentials and the key you would actually have, on a day when the primary is not there to help.

Knowledge check

Knowledge check · 5 questions

  1. Q1. A PBS host’s boot device fails but its datastore disks are intact. What is lost?

  2. Q2. Why is pull sync generally preferred over push for a DR replica?

  3. Q3. Which are sound elements of an encryption-key escrow design for PBS? Select all that apply.

  4. Q4. Enabling remove-vanished on a DR sync job is good practice because it keeps the DR datastore consistent with the primary.

  5. Q5. On a PVE cluster, where is the encryption key for a PBS storage kept, and why does that create a circular dependency?

Passing score: 75%. Answers are checked in this browser.