diff --git a/src/zfs-auto-snapshot.sh b/src/zfs-auto-snapshot.sh index fb4c8d1..5763c37 100755 --- a/src/zfs-auto-snapshot.sh +++ b/src/zfs-auto-snapshot.sh @@ -339,7 +339,7 @@ ZFS_LIST=$(env LC_ALL=C zfs list -H -t filesystem,volume -s name \ -o name,com.sun:auto-snapshot,com.sun:auto-snapshot:"$opt_label") \ || { print_log error "zfs list $?: $ZFS_LIST"; exit 136; } -SNAPSHOTS_OLD=$(env LC_ALL=C zfs list -H -t snapshot -S creation -o name) \ +SNAPSHOTS_OLD=$(env LC_ALL=C zfs list -H -t snapshot -o name -s name|grep $opt_prefix |awk '{ print substr( $0, length($0) - 14, length($0) ) " " $0}' |sort -r -k1,1 -k2,2|awk '{ print substr( $0, 17, length($0) )}') \ || { print_log error "zfs list $?: $SNAPSHOTS_OLD"; exit 137; }