Fix deletion

This commit is contained in:
Thorsten Spille 2023-02-18 17:35:25 +01:00
parent c08ac04879
commit 02e330de61

View File

@ -132,8 +132,8 @@ for name in "${syncvols[@]}"; do
done done
# cleanup old snapshots # cleanup old snapshots
filter=$(echo -e $snapshot_filter | sed "s/|/ /g") filter=$(echo -e $snapshot_filter | sed "s/|/\n/g")
IFS=$' ' IFS=$'\n'
for interval in $filter ; do for interval in $filter ; do
guid=$($ssh $sshport $source "zfs list -H -o guid,name -S creation -t snapshot $name | grep $interval | cut -f1 | tail -1") guid=$($ssh $sshport $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 if [[ "$(echo -e "$guid" | sed 's/\n//g')" != "" ]]; then