Offsite backup for Proxmox VE
configs, LXC data, and more

Proxmox Backup Server handles VM snapshots well. But your /etc/pve configs, LXC application data, and critical datasets need offsite backup too. Restic over SFTP fills that gap cleanly.

What to back up from Proxmox with restic

Proxmox has several categories of data worth protecting offsite:

  • /etc/pve:VM configs, storage definitions, cluster config, firewall rules. Small but critical - losing this means rebuilding your entire Proxmox setup from scratch.
  • LXC rootfs data:Application data inside containers. ZFS makes snapshotting clean - back up a snapshot rather than the live container.
  • /var/lib/vz:Templates, ISOs, and backup files if you use local PBS. Often large but worth including selectively.
  • /root and /home:Scripts, SSH keys, cron jobs, and config files on the Proxmox host itself.

Install restic on Proxmox host

apt update && apt install -y restic
restic version

Back up Proxmox configs

The most important backup - run this daily. /etc/pve is small but irreplaceable.

#!/bin/bash
source /etc/restic/env

restic backup \
  /etc/pve \
  /etc/network \
  /etc/cron.d \
  /root \
  --tag proxmox-configs \
  --exclude="/etc/pve/priv"

restic forget --keep-daily 30 --keep-monthly 6 --tag proxmox-configs --prune

Back up LXC data using ZFS snapshots

On ZFS-backed Proxmox, snapshot the LXC dataset before backup so restic gets a consistent view of the filesystem even while the container is 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"

restic forget --keep-daily 7 --keep-weekly 4 --tag "ct${CTID}" --prune

Automate with systemd timer

Save your backup script and wire it up with a systemd timer to run nightly. See our systemd timer guide for the complete unit file setup.

Offsite target: SFTP via ServerCrate

Set RESTIC_REPOSITORY to your ServerCrate vault connection string. Private vault, ZFS-backed storage, flat monthly pricing, no egress fees when you restore during an incident.

export RESTIC_REPOSITORY="sftp:vaultuser@vault.servercrate.net:22150:/data"
export RESTIC_PASSWORD="your-repository-password"
restic init

Proxmox-specific restic considerations

When running restic on the Proxmox host itself, be aware that the Proxmox cluster filesystem (pmxcfs) mounts /etc/pve as a fuse filesystem. Restic backs this up correctly, but you will see it listed as a fuse mount in the backup output - this is normal. The config files inside are standard text files and restore cleanly.

For LXC containers running databases, the recommended approach is to install restic inside the container and run a pre-backup database dump. This gives you application-consistent snapshots of the database without stopping the container. Use systemd timers inside the LXC (if the container is Debian/Ubuntu-based) or cron for simpler setups. See the systemd timer guide for unit file examples.

Testing your Proxmox backup restores

At minimum, run restic check monthly against your ServerCrate vault to verify repository integrity. Quarterly, do a test restore of your /etc/pve directory to a temporary location and verify the files look correct. The restore guide has full commands for every restore scenario.

FAQ

Common questions.

Restic backs up files, not VM disk images. For full VM snapshot and restore, use Proxmox Backup Server. Use restic for configs, LXC data, and file-level backup of application state.
Take a ZFS snapshot of the LXC dataset, mount it, run restic backup against the mount point, then destroy the snapshot. This gives you a consistent backup without stopping the container.
/etc/pve contains all your VM configs, storage definitions, and cluster state. It's small but irreplaceable. Back it up daily to an offsite target.
Daily for configs and LXC application data. Weekly or on-demand for larger datasets like PBS backup files. The first run is slow; incremental runs are fast.
Get started today

Start backing up Proxmox offsite.

Private vault. ZFS-backed. No egress fees.

No egress fees, cancel anytime, 7-day money-back guarantee