clarification of snapshots

Started by tessus, Today at 05:38:16 AM

Previous topic - Next topic
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', ZFS snapshots are use but the purpose is not for rollbacks but having different boot environments.

Reading OPnsense/Snapshots: 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'.
Deciso DEC740

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.
Deciso DEC740

Today at 10:07:08 AM #4 Last Edit: Today at 10:09:47 AM by tessus
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.

P.S.: I haven't read up on the bectl link, but will do so later today. Thanks for the link. Maybe the link will make things clearer for me.

I dont know what to additionally clarify. The documentation explains these questions I think. Just try to read it from start to finish and if something is still unclear we can improve the documentation?

https://docs.opnsense.org/manual/snapshots.html
Hardware:
DEC740

The documentation is pretty clear. Plus the latest release brought a tooltip for snapshot states in the UI....

Also, PROXMOX e.g linux snapshots and fBSD snapshots are not the same thing. The later is more superior.

Regards,
S.
Networking is love. You may hate it, but in the end, you always come back to it.

OPNSense HW
APU2D2 - deceased
N5105 - i226-V | Patriot 2x8G 3200 DDR4 | L 790 512G - VM HA(SOON)
N100   - i226-V | Crucial 16G  4800 DDR5 | S 980 500G - PROD