ansible-nas icon indicating copy to clipboard operation
ansible-nas copied to clipboard

Add a default Sanoid ZFS snapshot configuration

Open scotws opened this issue 6 years ago • 3 comments

It is pretty likely that users will have one or more ZFS datasets ("shares") for Plex/Emby/Jellyfish, so it might be worth provided an example Sanoid configuration for snapshots of these filesystems. This could possibly be made into an Ansible thingie to automate?

scotws avatar Jun 05 '19 14:06 scotws

sudo apt install zfs-auto-snapshot

Then edit the crons it generates in /etc/cron.d/ : zfs-auto-snapshot.cron.daily zfs-auto-snapshot.cron.frequent zfs-auto-snapshot.cron.hourly zfs-auto-snapshot.cron.monthly zfs-auto-snapshot.cron.weekly

This is the most simple way to manage your snapshots, no playbook necessary :)

animeai avatar Aug 28 '19 10:08 animeai

Sanoid plays nice with Syncoid, which can be more than occasionally useful, and has simpler bulk-configuration than zfs-auto-snapshot does.

Though, not sure why you're editing your cron files for it - the defaults are sane. All you need to do is add com.sun:auto-snapshot=true and same for whatever schedule you want to set: com.sun:auto-snapshot:frequent=true, continue on for hourly daily weekly and monthly.

wolffstarr avatar Aug 30 '19 00:08 wolffstarr

If added, please don't make it default. Make it an enable/disable option. I don't use ZFS. :)

bcurran3 avatar Sep 01 '20 01:09 bcurran3

No action on this one. Happy to accept PRs if people think it's useful.

davestephens avatar Nov 12 '23 21:11 davestephens