Skip datasets without snapshots
This commit is contained in:
parent
120e057ea2
commit
034431a935
@ -126,6 +126,7 @@ log "$exclude_list"
|
|||||||
|
|
||||||
for name in "${syncvols[@]}"; do
|
for name in "${syncvols[@]}"; do
|
||||||
if [[ $debug == "-v" ]]; then log "[DEBUG] Checking $name"; fi
|
if [[ $debug == "-v" ]]; then log "[DEBUG] Checking $name"; fi
|
||||||
|
if [[ $($ssh $sshcipher $sshport $source "zfs list -H -t snapshot -o name -S creation $name 2>/dev/null | grep -E \"$snapshot_filter\" | wc -l") -gt 0 ]]; then
|
||||||
IFS=$' '
|
IFS=$' '
|
||||||
if [ $($zfs list -H $target/$name > /dev/null 2>&1 ; echo $?) -gt 0 ]; then
|
if [ $($zfs list -H $target/$name > /dev/null 2>&1 ; echo $?) -gt 0 ]; then
|
||||||
if [[ $debug == "-v" ]]; then log "[DEBUG] $target/$name does not exist"; fi
|
if [[ $debug == "-v" ]]; then log "[DEBUG] $target/$name does not exist"; fi
|
||||||
@ -188,4 +189,7 @@ for name in "${syncvols[@]}"; do
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
else
|
||||||
|
if [[ $debug == "-v" ]]; then log "[DEBUG] No snapshots found for $name with filter $snapshot_filter"; fi
|
||||||
|
fi
|
||||||
done
|
done
|
Loading…
Reference in New Issue
Block a user