2023-11-07 - Create ZFS Snapshots WesleyBallard.com Links: 01: https://openzfs.github.io/openzfs-docs/man/v2.2/8/zfs-snapshot.8.html 02: https://docs.oracle.com/cd/E19253-01/819-5461/gbcya/index.html 03: https://docs.oracle.com/cd/E19253-01/819-5461/gbcpt/index.html 01: List datasets zfs list 02: Create a dataset snapshot including all descendent file systems. The '-r' flag causes the snapshot to be recursive and include descendents. The snapshot name must follow the naming requiements in link '03'. Simply put, Start with a letter, no spaces or special characters except Underscore (_) Hyphen (-) Colon (:) Period (.) The '@' symbol seperates the dataset name from the snapshot name. zfs snapshot -r tank/Documents@Snapshot-2023-11-07 03: View list of all snapshots zfs list -t snapshot 04: Script to create snapshots of all datasets excluding the root data set Replace 'tank/' with the name of your dataset. To include the root dataset in the snapshots remove the '/' after 'tank' for DATASET in $(zfs list | grep tank/ | cut -d " " -f 1); do zfs snapshot -r $DATASET@Snapshot-$(date "+%Y-%m-%d"); done