diff --git a/backup.sh b/backup.sh index c23e074..f6ab24b 100755 --- a/backup.sh +++ b/backup.sh @@ -44,6 +44,7 @@ debug() run_send_recv() { ssh_cmd="ssh $SSH_SEND_OPTS -o port=$port $user@$addr" + pv_cmd="pv -qL ${speed:-$DEFAULT_SPEED}" if [ $ZB_TEST_MODE = "TRUE" ]; then echo "$send_cmd | $pv_cmd | $ssh_cmd $recv_cmd" else @@ -219,7 +220,6 @@ send_latest() debug "Processing $dset (remote $rset)." snap1=`get_latest_snapshot $dset` send_cmd="zfs send $ZFS_SEND_OPTS $dset@$snap1" - pv_cmd="pv -qL ${speed:-$DEFAULT_SPEED}" recv_cmd="zfs recv $ZFS_RECV_OPTS $zroot$rset" run_send_recv done @@ -242,7 +242,6 @@ send_increment() snap1=`get_latest_snapshot` snap0=`get_latest_remote_snapshot` send_cmd="zfs send $ZFS_SEND_OPTS -i $dset@$snap0 $dset@$snap1" - pv_cmd="pv -qL ${speed:-$DEFAULT_SPEED}" recv_cmd="zfs recv $ZFS_RECV_OPTS $zroot$rset" run_send_recv done