I've been using snapshots on Proxmox forever and I have been doing the same on other ZFS systems as well. I have read through the OPNsense snapshot documentation and a few things make no sense to me and I kindly ask you to clarify the situation for me.
When I installed OPNsense on new HW I used ZFS this time around and during the installation a "default" snapshot was created and has been used since.
So the documentation states that if I create a snapshot and make it active, it will be used on next boot (basically does a rollback to the time of the snapshot creation). But my "default" snapshot was created in September last year and when I reboot, it is not rolled back to September, but everything since then has been persisted and it is as if there is no snapshot at all.
So my understanding of snapshots is this: A snapshot is exactly what its name suggests - a snapshot at any point in time. When I rollback to the snapshot it starts at the time the snapshot was created.
In Proxmox I run a VM and by default there are no snapshots. Then I can create snapshots at any point in time and roll back to exactly that point. And I can go back to that point in time multiple times.
But here in OPNsense it persists data. My problem of understanding is why and when will a snapshot in OPNsense start to persist data? When I make it active for the first time? If so, this means I cannot use (rollback to) a snapshot more than once. e.g. how do I rollback to Sept. 2025 when the "default" snapshot was created?
Somehow there is a disconnect I cannot reconcile.
It would all make sense to me, if there was a "rollback" button for the active snapshot. Or is the "Activate" button the rollback button? So even though the "default" snapshot is currently active, I would have to activate it again to rollback to Sept. 2025?
You are right, it's an odd behavior given the name but most of all I think its naming is not correct.
The feature is based on 'bectl -- Utility to manage boot environments on ZFS (https://man.freebsd.org/cgi/man.cgi?query=bectl)', ZFS snapshots are use but the purpose is not for rollbacks but having different boot environments.
Reading OPnsense/Snapshots: Recommended Workflow (https://docs.opnsense.org/manual/snapshots.html#recommended-workflow) explains the use quite well, e.g. if you want to test a config.
I think it would be clearer if it would be called 'Boot Environments'.
And then we'd have to explain to non-ZFS and non-tech users what a snapshot and a "BE" is. It's just not going to fly.
Cheers,
Franco
Quote from: franco on Today at 08:05:56 AMAnd then we'd have to explain to non-ZFS and non-tech users what a snapshot and a "BE" is. It's just not going to fly.
Well, you're the boss. You still have to explain to non-tech and non-ZFS people what a Snapshot is. Plus you also gotta explain to tech and ZFS people why these snapshots behave different then ZFS snapshots.
I am not sure, whether the term "boot environments" works either. Maybe it's a better term, but this still doesn't solve my confusion. What would happen, if I were to delete the currently active one (which is also the only snapshot). Or will I get an error that this isn't possible?
But I still do not understand how exactly those snapshots work. So I create a snapshot before I run a firmware update. While I update the firmware, this new snapshot grows (which points to it persisting data). So how do I rollback? Or is all the data that has been persisted removed as soon as I set it active? How can one roolback, if data is persisted?
I also do not know how to rollback my default one (the currently active one) to the time it was created.
It seems that I am not alone with my confusion and unfortunately I was not able to resolve the disconnect I still experience when trying to understand opnsense snapshots.