ZFS Boot Environments schedule - Feature Request
-
I've been using BTRFS filesystem for a while now in Arch Linux based distro.
To manage my snapshots, I'm using
snapper
, it allows me to create snapshots hourly, weekly, monthly and yearly.So,
snapper
has two services running, one to create snapshots and another one for cleanup, based on the criteria we set.So, as a feature request, I think it would be nice to have an option to schedule ZFS snapshots to be created and removed automatically.
In this snapper config example, I have:
5 hourly snapshots, 7 daily ones, no monthly and no yearly ones:
# limits for timeline cleanup TIMELINE_MIN_AGE="1800" TIMELINE_LIMIT_HOURLY="5" TIMELINE_LIMIT_DAILY="7" TIMELINE_LIMIT_WEEKLY="0" TIMELINE_LIMIT_MONTHLY="0" TIMELINE_LIMIT_YEARLY="0"
My system creates snapshots hourly, and the cleanup service is also scheduled to run hourly, which keeps around 11 snapshots created.
-
@mcury Snapshots of what?
a pfSense device typically has a relatively static configuration once it's all configured, it's easily backed up to a file off the pfSense device. Applying an upgrade? I believe the process may create a new BE do the upgrade and then reboot into that; typical freebsd-update binary update process.Snapshots of anything else is a snapshot of dynamic data (logs etc) and are really of no use.
The configuration of a device is what is important and there are ways to automate saving changes off the pfSense device.
Basically, my opinion only, "generic snapshot creation/handling" is not a good feature to have on a firewalling device.
-
@mer Thanks for the input.
I've been using SG-4100 for around a month and still learning about this feature.So, /var/logs and RDD data wouldn't be lost in case I restore a snapshot from 2 days ago or something like that?
With BTRFS, nested subvolumes are not restored when you restore the level 5 id subvolume.
-
A ZFS snapshot is the full filesystem. You can roll back to that snap and the firewall will be in the same state it was at that time. Like a VM snapshot.
You would have to be careful with the drive space for a feature like this. That needs work anyway.
Open a feature request: https://redmine.pfsense.org/
Steve
-
@stephenw10 Thanks Steve, it seems that there is a lot to learn about ZFS before I open the feature request.
Once I feel more comfortable about it, I'll confirm if this is indeed a good idea.Thanks