From d77af5a902a3fb55043b4396e90b95f3c24c60bb Mon Sep 17 00:00:00 2001 From: Darik Horn Date: Tue, 10 Jan 2012 08:06:08 -0600 Subject: [PATCH 1/2] Update the README file to be more descriptive. --- README | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README b/README index d1d1a1b..745cf7d 100644 --- a/README +++ b/README @@ -1,4 +1,12 @@ -An alternative implementation of the zfs-auto-snapshot service for Linux. +zfs-auto-snapshot: + +An alternative implementation of the zfs-auto-snapshot service for Linux +that is compatible with zfs-linux and zfs-fuse. + +Automatically create, rotate, and destroy periodic ZFS snapshots. This is +the utility that creates the @zfs-auto-snap_frequent, @zfs-auto-snap_hourly, +@zfs-auto-snap_daily, @zfs-auto-snap_weekly, and @zfs-auto-snap_monthly +snapshots if it is installed. This program is a posixly correct bourne shell script. It depends only on the zfs utilities and cron, and can run in the dash shell. From cc9f1802ed56852c2bf9f619308abacaab8b0ea1 Mon Sep 17 00:00:00 2001 From: Darik Horn Date: Sat, 21 Jan 2012 16:32:30 -0600 Subject: [PATCH 2/2] Fix pool exclusions. Use $ZPOOL_STATUS instead of $ZFS_STATUS for pool exclusions. A mistaken variable name made the pool exclusion logic a no-op and broke the --skip-scrub switch. Also correct a trivial comment typo. --- src/zfs-auto-snapshot.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/zfs-auto-snapshot.sh b/src/zfs-auto-snapshot.sh index 44db629..fb4c8d1 100755 --- a/src/zfs-auto-snapshot.sh +++ b/src/zfs-auto-snapshot.sh @@ -358,13 +358,13 @@ do done # Get a list of pools that are being scrubbed. -ZPOOLS_SCRUBBING=$(echo "$ZFS_STATUS" | awk -F ': ' \ +ZPOOLS_SCRUBBING=$(echo "$ZPOOL_STATUS" | awk -F ': ' \ '$1 ~ /^ *pool$/ { pool = $2 } ; \ $1 ~ /^ *scan$/ && $2 ~ /scrub in progress/ { print pool }' \ | sort ) # Get a list of pools that cannot do a snapshot. -ZPOOLS_NOTREADY=$(echo "$ZFS_STATUS" | awk -F ': ' \ +ZPOOLS_NOTREADY=$(echo "$ZPOOL_STATUS" | awk -F ': ' \ '$1 ~ /^ *pool$/ { pool = $2 } ; \ $1 ~ /^ *state$/ && $2 !~ /ONLINE|DEGRADED/ { print pool } ' \ | sort) @@ -446,7 +446,7 @@ do # Ibid regarding iii. jjj="$jj/" - # The --recusive switch only matters for non-wild arguments. + # The --recursive switch only matters for non-wild arguments. if [ -z "$opt_recursive" -a "$1" != '//' ] then # Snapshot this dataset non-recursively.