Source: https://www.youtube.com/watch?v=6ayd2NHkBXk&t=931s
Proxmox5, running only 2 mirrored SSDs à 240Go (pool zfs RAID1).
In this case Proxox runs on dataset rpool/ROOT/pve-1 and the VMs are on datasets rpool/data/VM#######.
Restoring the Proxmox is restoring “pve-1” and restoring the VMs.
# zfs snapshot -r rpool@complete # zfs send -Rpv rpool@complete | ssh root@FreeNAS.domain.tld zfs recv -vF pool/backup/Proxmox
The Proxmox OS and the VMs can be restored independently from each other.
As the restoring is made from a usb device containing the snapshots, I think that the easier way is to restore only the OS in a first time and the VMs in a second time after the system is running again. In this case a simple usb stick is sufficient.
Getting the snapshot of rpool/ROOT/pve-1 on the usb stick:
root@FreeNAS $ zfs send -pv pool/backup/Proxmox/rpool/ROOT/pve-1@complete | zfs recv restore/pve-1
zpool import
shows the pool recreated during the new install and the pool for restore from the USB stick.
zpool import -f rpool
$ zfs list
shows the datasets created during the fresh installation of Proxmox, present on the RAID1 pool.
$ zfs rename rpool/ROOT/pve-1 rpool/ROOT/pve-2 $ zfs get mountpoint rpool/ROOT/pve-2 NAME PROPERTY VALUE SOURCE rpool/ROOT/pve-2 mountpoint / local ### this confirms that rpool/ROOT/pve-2 is mounted on "/" $ zfs set mountpoint=/rpool/ROOT/pve-2 rpool/ROOT/pve-2 ### or the mountpoint you want $ zfs get mountpoint rpool/ROOT/pve-2 NAME PROPERTY VALUE SOURCE rpool/ROOT/pve-2 mountpoint /rpool/ROOT/pve-2 local ### => OK
$ zpool import restore
$ zfs list $ zfs list -t snap
$ zfs send -pv restore/rpool/ROOT/pve-1@complete | zfs recv -dvF rpool/ROOT
The transfer of data should be visible.
$ zfs set mountpoint=/ rpool/ROOT/pve-1 ##### It is possible that "/" is already mounted because Proxmox have already done the mounting automatically. $ zfs get mountpoint rpool/ROOT/pve-1 ## will confirm
$ zpool export restore
$ zfs list $ exit
I had some minor issues at the reboot:
After the OS runs:
# update-grub2
and reboot to solve the error messages at boot up.
Restore the disks of the VMs:
From the FreeNAS:
# zfs send -pv pool/backup/Proxmox/rpool/data/vm-100-disk-0@complete | ssh root@proxmox.domain.tld zfs recv rpool/data/vm-100-disk-0
and so on…