
https://github.com/zfsonlinux/zfs-auto-snapshot/issues/7

Q: Need selective exclusion variable option

   Need a way to define selective zfs pools/datasets/zvols to be excluded
   from automated snapshots. Using Ubuntu 12.04 so perhaps a variable read
   in from /etc/default/zfs-auto-snapshot? zfs-auto-snapshot seems like an
   all or nothing option right now.


A: Set this property to exclude a dataset:

   # zfs set com.sun:auto-snapshot=false tank/foo



http://serverfault.com/questions/340837/how-to-delete-all-but-last-n-zfs-snapshots

Q: How to delete all but last [n] ZFS snapshots?

   E.g. I've got two filesystems, one called tank and another called sastank.
   Snapshots are named with the date on which they were created:
   sastank@AutoD-2011-12-13 so a simple sort command should list them in order.
   I'm looking to keep the last 2 week's worth of daily snapshots on tank,
   but only the last two days worth of snapshots on sastank.


A: You may find something like this a little simpler

   # zfs list -t snapshot -o name -s name |grep ^tank@Auto | sed 1,15d | xargs -n 1 zfs destroy -r

   Test it with ...|xargs -n 1 echo

