ZFS Snapshot Management Script (+ Hello!)

Hi everyone. I just fond out that people have been moving here from the Reddit to discuss ZFS. I’m happy to join the forum to learn and share in ZFS topics!

I have not been using ZFS myself for very long, but I have played around with it a bit and I am using it on my storage drives on a couple of Ubuntu servers (headless). Currently I am trying to figure out how to do setup a snapshot and backup solution for my ZFS pools. I am using zfs-autobackup which I have found easy to understand and configure.

However, having a lot of datasets on multiple pools and several machines I have found it a bit cumbersome to get a good overview of the all snapshots, holds and custom properties, especially when performing operations in relation to testing etc. So I made myself a small Bash script to help me with this. With the script I can list snapshots and datasets by, name, custom property and hold tags, and also show filtered list bases on which datasets has snapshots, don’t have snapshots, has custom properties and no snapshots, etc., then make selections and actions on multiple datasets/snapshots from these lists.

I’m not very good with bash script and it is currently a bit messy and inconsistent (and might still contain a few bugs I have not seen yet), but it currently gets the job done for me. I thought I should share it here in case anyone else is interested and might find it useful. Have a look at the Readme and try it out. Please feel free to give comments, feedback and suggestions for improvement :slight_smile: