From f0b279c9191dfeb1ff0f5c023b63c17811e1f50e Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 16 Apr 2020 02:06:50 +0200 Subject: [PATCH] fixed comments and readme --- README.md | 1 + src/zfs-auto-snapshot.sh | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8ce93cd..740df52 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ zfs-auto-snapshot scripts allow automatic snapshots of all zfs filesystems and volumes. The script will automatically rotate snapshots deleting old ones. +The script will temporarely avoid backups on damaged pools or pools with scrubbing going on. It creates: 4 snapshots for hour to rotate every 15 min diff --git a/src/zfs-auto-snapshot.sh b/src/zfs-auto-snapshot.sh index 419fc47..b4ca4ac 100755 --- a/src/zfs-auto-snapshot.sh +++ b/src/zfs-auto-snapshot.sh @@ -68,7 +68,7 @@ ZPOOLS_NOTREADY=$(echo "$ZPOOL_STATUS" | awk -F ': ' \ $1 ~ /^ *state$/ && $2 !~ /ONLINE|DEGRADED/ { print pool } ' \ | sort) -# Initialize the list of datasets that will get a recursive snapshot. +# Initialize the list of datasets that will get snapshots. TARGETS='' for ii in $CANDIDATES @@ -93,10 +93,8 @@ do TARGETS="$TARGETS $ii" done -# ISO style date; fifteen characters: YYYY-MM-DD-HH-MM -DATE=$(date --utc +%F-%H-%M) -# The snapshot name after the @ symbol. +DATE=$(date --utc +%F-%H-%M) SNAPNAME="${opt_prefix}_${opt_label}_$DATE" # The expression for matching old snapshots.