Backup partitions and bootloaders using PBS client

Dunuin

Distinguished Member
Jun 30, 2020
14,793
4,627
258
Germany
Hi,

Right now, if I want to backup by first PVE nodes system disks I boot into a debian and use the PBS client to create a blocklevel backup of the complete mirrored 100GB system disks. Thats fine as the disks are small and guests are stored on other disks.

But I'm planning to switch my two bare metal TrueNAS server to PVE (PVE package on an encrypted Debian) too. I don't need to run alot of guests on these (just TrueNAS, PBS, OPNsense, WinVM for Veeam, Pi-hole LXC) so I would prefer to use a single 200GB or 400GB mirror of enterprise SSDs for both PVE system + guests. But in that case a backup of the complete disks would waste alot of space as guests will already be backupped to PBS. And because of the encryption this shouldn't deduplicate well with the existing VM backups.

Partitions could look like this:
Partition1 - 8MB: Grub
Partition2 - 512MB: ESP (but I guess I would use grub instead of systemd boot, but not bad to have it created in case I might need it later)
Partition3 - 512MB: Unencrypted mdadm mirrored boot partition with initramfs-dropbear
Partition4 - 32GB: LUKS encrypted mdadm mirrored LVM for root and swap
Partition5 - 167GB or 367GB: partition for ZFS mirror (ZFS native encryption) used as VM/LXC storage

My idea was to use the PBS client to just backup Partitions 1 to 4 and in case I need to rollback PVE or a mirror fails I would wipe the SSDs, restore the 4 partitions, create a new 5th partition, build a new ZFS pool with them and then restore guests fro mthe PBS to it.
Did someone already tested something like that?

Would I need to create a new GPT before restoring so the disks are unpartitioned again? I guess in that case the disks UUID would change and that might cause problems with the bootloader, encryption and fstab?
Does Debian only write the bootloader to the grub/ESP partition or is there also data outside if the partitions that wouldn't be backupped if I just backup the partitions. I think to remember that grub was writing data to the first MB of the disk.

Or should I do it like before with my first PVE node with dedicated system disks? But right now both TrueNAS servers are using a mirror of 120GB consumer SSDs so using them for the system would be not that reliable and it would add to the power consumption which I'm already struggeling to pay.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!