Local/Remote Snapshots of Physical PVE Host/Node (ZFS)?

n1nj4888

Active Member
Jan 13, 2019
162
19
38
44
Hi There,

I'm trying to figure out if there is an easy way to use the ZFS filesystem of the Physical PVE Node to make local/remote snapshots of the host filesystem?

I know there is away to replicate local VM disks from local-zfs (Physical PVE Node 1) to local-zfs (Physical PVE Node 2) but does there exist any way in Proxmox to snapshot the whole root ZFS filesstem of the Physical PVE Node itself (ZFS on EFI), either as a local snapshot or a snapshot that is sent to another remote host for backup purposes?

For example, I'd be able to say snapshot Node 1 before updates/testing a new kernel and, if required, rollback the snapshot to the previous update / kernel set?

Many Thanks!
 
Hi,
For example, I'd be able to say snapshot Node 1 before updates/testing a new kernel and, if required, rollback the snapshot to the previous update / kernel set?

First, FYI, we do not remove the last few kernel automatically, so you can always just select an older on in your bootlader (GRUB or systemd-boot if EFI).

I know there is away to replicate local VM disks from local-zfs (Physical PVE Node 1) to local-zfs (Physical PVE Node 2) but does there exist any way in Proxmox to snapshot the whole root ZFS filesstem of the Physical PVE Node itself (ZFS on EFI), either as a local snapshot or a snapshot that is sent to another remote host for backup purposes?

There is, with ZFS you can snapshot whole datasets, pools, all recursively too, if you want it - basically easy+fast Snapshotting is the thing ZFS is really good at.

But, and that's a big but, there are some things to look for when doing a whole host snapshot - as while it sounds good that the whole state is reverted, it may not always be. So you need to take upon you a few decisions, for doing such snapshots in your setup.
  • Should VMs/CTs backed by that ZFS be restored too, to their old state? E.g., a situtaion were you reboot and the most of the host runs for a while but then shows (grave) issues, so rollback it is; BUT, if you did a recursive snapshot over all, the VM/CT state maybe rolled back too - Databases (or there users), among other won't like that - so depending on what you host you want to ensure that only the host root is snapshoted, but nothing else - or at least a limitless VM/CT set which are stateless itself.
  • Same for some directories of the host, e.g., /var/log - you boot into something bad, OK, let's rollback and then look what happened (as sooner or later you want to upgrade, or ensure it was not a HW fault), but the logs also got rolled back, to bad. or /etc/pve (better said, it's backind DB in /var/lib/pve-cluster) else new VM/CT or changes to them are also "rolledback" (somewhat)
  • config changes in between a snapshot and a rollback are lost too
Basically, it's not as easy as just making the snapshots and then rolling back on issues. One needs to plan this out for a specific setup..

And then the questions arises, if simple backups before major upgrades, and the "I can boot old kernels anyway" functionallity isn't really enough to cover all this with less headache? Just my two cents.

For how to snapshot anything in ZFS you can take a look at the zfs manpage and search for "zfs snapshot", which is the command with which you would create those it. Else, there are also various how-tos on the internet available.
 

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!