if [[ -n "$SCRIPT_UNDER_TEST" ]]; then
echo "$zfs send -R $src_pool/$last_backup_marker | ssh $dst_hostname $zfs recv -dv $dst_pool"
else
- $zfs send -R "$src_pool/$last_backup_marker" | ssh $dst_hostname "$zfs recv -dv $dst_pool"
+ if [[ $throttle_enable == 1 && -e $throttle ]]; then
+ $zfs send -R "$src_pool/$last_backup_marker" | $throttle $throttle_opt | ssh $dst_hostname "$zfs recv -dv $dst_pool"
+ else
+ $zfs send -R "$src_pool/$last_backup_marker" | ssh $dst_hostname "$zfs recv -dv $dst_pool"
+ fi
fi
# Now rename the dst filesystem (move it into place)