mirror of
https://git.bashclub.org/bashclub/zsync.git
synced 2024-11-25 03:25:16 +01:00
Fix deletion
This commit is contained in:
parent
a639bb05c2
commit
b60f4011e2
@ -215,7 +215,7 @@ for name in "${syncvols[@]}"; do
|
||||
IFS=$'\n'
|
||||
for interval in $filter ; do
|
||||
if [[ $debug == "-v" ]]; then log "[DEBUG] $name - Checking interval $interval"; fi
|
||||
guid=$($ssh $sshcipher $sshport $source 'zfs list -H -o guid,name -S creation -t snapshot $name | grep -E "(.*)@(.*)$interval" | cut -f1 | tail -1')
|
||||
guid=$($ssh $sshcipher $sshport $source "zfs list -H -o guid,name -S creation -t snapshot $name | grep -E \"(.*)@(.*)$interval\" | cut -f1 | tail -1')"
|
||||
if [[ "$(echo -e "$guid" | sed 's/\n//g')" != "" ]]; then
|
||||
snaps_to_delete=$($zfs list -H -o name,guid -S creation -t snapshot $target/$name | $grep -E "(.*)@(.*)$interval" | $grep --after-context=200 $guid | $grep -v $guid | $cut -f1)
|
||||
snap_count=$($zfs list -H -o name,guid -S creation -t snapshot $target/$name | $grep -E "(.*)@(.*)$interval" | $wc -l | $tr -d ' ')
|
||||
|
Loading…
Reference in New Issue
Block a user