From e7b707bc478ac902fa4fd14585f75dcdc2ccbf21 Mon Sep 17 00:00:00 2001 From: Thorsten Spille Date: Sat, 18 Feb 2023 12:13:01 +0100 Subject: [PATCH] fix snapshot_filter for deletion --- bashclub-zsync/usr/bin/bashclub-zsync | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bashclub-zsync/usr/bin/bashclub-zsync b/bashclub-zsync/usr/bin/bashclub-zsync index 87ab631..07329b7 100644 --- a/bashclub-zsync/usr/bin/bashclub-zsync +++ b/bashclub-zsync/usr/bin/bashclub-zsync @@ -126,7 +126,7 @@ for name in "${syncvols[@]}"; do done # cleanup old snapshots - for interval in $(echo -e $snapshot_filter) ; do + for interval in $(echo -e $snapshot_filter | sed "s/|/ /g") ; do guid=$($ssh $source "zfs list -H -o guid,name -S creation -t snapshot $name | grep $interval | cut -f1 | tail -1") if [[ "$(echo -e "$guid" | sed 's/\n//g')" != "" ]]; then for snap in $($zfs list -H -o name,guid -S creation -t snapshot $target/$name | grep $interval | grep --after-context=200 $guid | grep -v $guid | cut -f1); do