Relax-and-Recover on Proxmox

Author:       -fab- 
License:      CC BY-SA 4.0
Published on: Wed, 17 Sep 2025 17:06:17 +0200
Last updated: Tue, 23 Sep 2025 23:45:00 +0200

I set up "Relax-and-Recover" (ReaR) for bare metal backups of my Proxmox nodes OS drives.

Relax-and-Recover website (www)
Relax-and-Recover GitHub repo (www)

It now outputs ISO images with a full backup of my two Proxmox nodes every Sunday. These can be used to make a full recover of a node including bootloader and all the stuff. It just backs up the main installation disk and not the disks containing the VMs and containers or any ZFS pools.

Relax-and-Recover

I recommend to install the newest release from the GitHub repo. You also have to install a few other programs:

apt install genisoimage syslinux isolinux attr xorriso nfs-common bc sedutil multipath-tools cryptsetup

You might need to install a few other packages, just run "rear -v -d mkbackup" to see the debug output for missing programs.

All my Proxmox nodes are headless, so I need to add 'sshd' to REQUIRED_PROGS and '/usr/lib/openssh/*' to LIBS, so I can connect to the ReaR OS via SSH (Caution: changed host keys for ssh). Here's my "/etc/rear/local.conf" from pve1 (first Proxmox node). Adapt it to your needs:

### Rescue image will be the default (ISO) ###
OUTPUT=ISO
OUTPUT_URL=file:///mnt/pve/Storage/rear
BACKUP=NETFS
BACKUP_URL=iso:///mnt/pve/Storage/rear
ISO_VOLID="REARISO"
ISO_ISOLINUX_BIN="/usr/lib/ISOLINUX/isolinux.bin"
# ISO_DEFAULT="manual"
ISO_FILE_SIZE_LIMIT=4294967296

### GRUB2 setup ###
GRUB2_TIMEOUT=10
GRUB_RESCUE=n
GRUB2_DEFAULT_BOOT="rear"

### Excluding other mounts and files from backup ###
EXCLUDE_MOUNTPOINTS+=( /SSD-ZFS /mnt/pve/Storage /zdata /srv/SYNCTHING )
EXCLUDE_RESTORE=( /SSD-ZFS /zdata )
BACKUP_PROG_EXCLUDE=( '/var/tmp/*' '/var/lib/rear/output/*' '/.swapfile' )


### Migration mode (if recovering to different disk) ###
AUTORESIZE_PARTITIONS="yes"
AUTORESIZE_EXCLUDE_PARTITIONS=( boot swap efi )
AUTOSHRINK_DISK_SIZE_LIMIT_PERCENTAGE=20
AUTOINCREASE_DISK_SIZE_THRESHOLD_PERCENTAGE=10

### Progs to include in the Relax-and-Recovery OS on the ISO ###
REQUIRED_PROGS=(
"$SCRIPT_FILE"
chronyd
awk
bash
bc
cat
chroot
cmp
cp
cpio
cut
dd
diff
df
dumpkeys
echo
expr
file
find
getopt
grep
ip
join
kbd_mode
ldd
less
loadkeys
ls
mkdir
mount
mountpoint
mv
pidof
ps
pwd
readlink
rm
sed
seq
sort
ssh
sshd
strings
sync
systemd-tty-ask-password-agent
tar
test
tr
tty
umount
update-initramfs
uniq
wc
)

LIBS=( /usr/lib/openssh/* )

FIRMWARE_FILES=( 'yes' )

# Set Keymap for ttys
KEYMAPS_DIRECTORIES=( /usr/share/keymaps/i386/qwertz/ /usr/share/keymaps/include/ )
KEYMAP="de"

# For time sync
TIMESYNC="CHRONY"

# initrd compression
REAR_INITRD_COMPRESSION="fast"

### Network setup for pve1 ###
USE_DHCLIENT="no"
USE_STATIC_NETWORKING=1

Ventoy

Because I have no DVD drive to connect to the nodes for a recover I use "ventoy" to boot the images from an USB stick, which I prepare for a disaster recovery. You just have to configure ventoy to automatically boot the right ISO from the USB stick if you're recovering headless.

If you're using Ventoy to boot your ISO images, you can set 'ISO_FILE_SIZE_LIMIT=0' in the ReaR '/etc/rear/local.conf' file to disable the check for the maximum size of the backup file on the ISO because Ventoy can boot ISOs with bigger files than 4 GiB in it.

Ventoy website (www)
Ventoy GitHub repo (www)

You have to rename your recovery ISO image to end in '_VTGRUB2.iso' when automatically booting an ISO. You find some further information on the following link:

Ventoy special identifier in ISO name (www)

Here's my '/ventoy/ventoy.json' file on the Ventoy USB stick. Adjust it for your case:

{
    "control": [
        { "VTOY_MENU_LANGUAGE": "de_DE" },
        { "VTOY_DEFAULT_MENU_MODE": "0" },
        { "VTOY_TREE_VIEW_MENU_STYLE": "0" },
        { "VTOY_FILT_DOT_UNDERSCORE_FILE": "1" },
        { "VTOY_SORT_CASE_SENSITIVE": "0" },
        { "VTOY_MAX_SEARCH_LEVEL": "max" },
        { "VTOY_DEFAULT_SEARCH_ROOT": "/" },
        { "VTOY_MENU_TIMEOUT": "10" },
        { "VTOY_DEFAULT_IMAGE": "/rear-pve1_VTGRUB2.iso" },
        { "VTOY_FILE_FLT_EFI": "1" },
        { "VTOY_DEFAULT_KBD_LAYOUT": "QWERTZ_DE" },
        { "VTOY_WIN11_BYPASS_CHECK": "1" },
        { "VTOY_WIN11_BYPASS_NRO": "1" },
        { "VTOY_HELP_TXT_LANGUAGE": "de_DE" },
        { "VTOY_SECONDARY_BOOT_MENU": "2" },
        { "VTOY_SECONDARY_TIMEOUT": "1" }
    ]
}

Recover

If you've booted into the ReaR recovery OS, you just have to run the following command to initiate the restore:

# start recovery in interactive mode
rear -v recover

If the recover has finished, the recovered system is still mounted on '/mnt/local' and you can chroot into it to tweak it if needed:

# chroot into mounted recovered system
chroot /mnt/local/ /bin/bash

If you're finished, power off the system, remove the USB stick and start the system again. If all went well, your Proxmox node should come up again.

DISCLAIMER

I'm not responsible if you destroy your Proxmox node during a recover!

!!!YOU DO A RECOVER ONLY AT YOUR OWN RISK!!!

Final words

I already tested the recovery on both bare metal Proxmox nodes and after some troubles at first test and an extremely exausting search for the error I could get the first node back online. Phew!

After creating new backup ISOs and another testing of the bare metal recovery on my nodes from the ISOs both nodes came back online after the recover without problems (all systemd services up) and started all VMs and containers.

I've long searched for a backup solution for my Proxmox nodes and it seems "Relax-and-Recover" is the ideal tool for it (after some trial and error). Now I have the perfect strategy for recovering my Proxmox nodes in case of a desaster. You can also recover your backup on a new drive, when the current one fails and adapt it to the new drive size. Another problem solved!

All in all - Have fun!

-fab-

--

Back to index
Homepage
Send me a gemini-mention!
Or write me an email.