This is a proof of concept for backup and restore or clone a proxmox zfs bare metal host on a home lab system.
This is not about VM backup.
For production environments more tests are necessary.
TL;TR
backup running system to <destination>
restore with rescue console on new hardware from <source>
Please see the full guide on github.
https://github.com/KlausKurz/guide-...x/pve-bare-metal-host-backup-clone-restore.md
Comments very welcome
This is not about VM backup.
For production environments more tests are necessary.
TL;TR
backup running system to <destination>
Code:
zfs snapshot -r rpool@export
zfs send -R rpool@export | gzip > <destination>/backup-pve-rpool@export.gz
sgdisk --backup=<destination>/sgdisk-dev-sda /dev/sda
dd bs=64M if=/dev/sda1 | gzip > <destination>/dev-sda1.gz
dd bs=64M if=/dev/sda2 | gzip > <destination>/dev-sda2.gz
restore with rescue console on new hardware from <source>
Code:
sgdisk --load-backup=<source>/sgdisk-dev-sda /dev/sda
gzip -c -d <source>/dev-sda1.gz | dd of=/dev/sda1
gzip -c -d <source>/dev-sda2.gz | dd of=/dev/sda2
zpool create -f -o ashift=12 rpool /dev/disk/by-id/<ata-xxxxxxxxxxxx>-part3
gzip -c -d <source>/backup-pve-rpool@export.gz | zfs receive -u -v -F rpool
zfs set mountpoint=/rpool rpool
zfs set mountpoint=/rpool/ROOT rpool/ROOT
zfs set mountpoint=/ rpool/ROOT/pve-1
zfs set mountpoint=/rpool/data rpool/data
zfs set mountpoint=/var/lib/vz rpool/var-lib-vz
zpool set cachefile=none rpool
zpool export rpool
Please see the full guide on github.
https://github.com/KlausKurz/guide-...x/pve-bare-metal-host-backup-clone-restore.md
Comments very welcome