On this page
What to back up from Proxmox with restic
Four kinds of Proxmox data belong offsite. Restic covers them at file level, alongside PBS for full VM images:
- /etc/pve:VM configs, storage definitions, cluster config, firewall rules. Small but critical: without it you rebuild everything.
- LXC rootfs data:Application data inside containers. Back up a ZFS snapshot rather than the live container.
- /var/lib/vz:Templates, ISOs and local backup files. Large; include selectively.
- /root and /home:Scripts, SSH keys, cron jobs and config on the host.
Install restic on the Proxmox host
Restic is packaged in the Debian repositories that Proxmox VE is built on, so one apt command installs it on the host:
apt update && apt install -y restic
restic versionBack up Proxmox configs
Back up /etc/pve daily: it is small and irreplaceable. This script covers the host configs that matter:
#!/bin/bash
source /etc/restic/env
restic backup \
/etc/pve \
/etc/network \
/etc/cron.d \
/root \
--tag proxmox-configs \
--exclude="/etc/pve/priv"Run retention with your cleanup key from one trusted machine, never from the hosts you back up; see retention on ServerCrate vaults.
Back up LXC data using ZFS snapshots
On ZFS-backed Proxmox, snapshot the LXC dataset first so restic reads a consistent filesystem while the container keeps running:
#!/bin/bash
set -euo pipefail
source /etc/restic/env
CTID=110
DATASET="rpool/data/subvol-${CTID}-disk-0"
SNAPSHOT="${DATASET}@restic-$(date +%Y%m%d)"
MOUNT="/mnt/ct${CTID}-snap"
# Snapshot and mount
zfs snapshot "$SNAPSHOT"
mkdir -p "$MOUNT"
mount -t zfs "$SNAPSHOT" "$MOUNT"
# Back up
restic backup "$MOUNT" --tag "ct${CTID}"
# Clean up
umount "$MOUNT"
rmdir "$MOUNT"
zfs destroy "$SNAPSHOT"Automate with systemd timer
Wire the scripts to a systemd timer to run nightly; the systemd timer guide has the complete unit files.
Offsite target: ServerCrate over HTTPS
Set RESTIC_REPOSITORY to your ServerCrate vault connection string: a private ZFS-backed vault, flat monthly pricing, and no egress fees when you restore during an incident.
export RESTIC_REPOSITORY="rest:https://vaultuser:YOUR_TOKEN@a1b2c3d4.vault.servercrate.net/"
export RESTIC_PASSWORD="your-repository-password"
restic initProxmox-specific restic considerations
pmxcfs mounts /etc/pve as FUSE; restic backs it up correctly and the plain-text configs restore cleanly.
For LXC databases, run restic inside the container and dump before each backup, on a systemd timer or cron. See the systemd timer guide for unit files.
Testing your Proxmox backup restores
Run restic check monthly against your vault. Each quarter, restore /etc/pve to a temporary location and check the files. The restore guide has commands for every scenario.