• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

ZFS Boot Environments schedule - Feature Request

Scheduled Pinned Locked Moved Official Netgate® Hardware
5 Posts 3 Posters 655 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M
    mcury
    last edited by Jun 16, 2023, 1:21 PM

    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.

    dead on arrival, nowhere to be found.

    M 1 Reply Last reply Jun 16, 2023, 4:17 PM Reply Quote 0
    • M
      mer @mcury
      last edited by Jun 16, 2023, 4:17 PM

      @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.

      M 1 Reply Last reply Jun 16, 2023, 4:44 PM Reply Quote 0
      • M
        mcury @mer
        last edited by Jun 16, 2023, 4:44 PM

        @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.

        dead on arrival, nowhere to be found.

        1 Reply Last reply Reply Quote 0
        • S
          stephenw10 Netgate Administrator
          last edited by Jun 16, 2023, 4:48 PM

          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

          M 1 Reply Last reply Jun 16, 2023, 4:54 PM Reply Quote 1
          • M
            mcury @stephenw10
            last edited by Jun 16, 2023, 4:54 PM

            @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 👍

            dead on arrival, nowhere to be found.

            1 Reply Last reply Reply Quote 0
            5 out of 5
            • First post
              5/5
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              This community forum collects and processes your personal information.
              consent.not_received