From 679b6fc1a88eeb077f0350dc6f76596e9c8ac684 Mon Sep 17 00:00:00 2001 From: Otho Date: Tue, 17 Jan 2023 00:05:31 -0500 Subject: [PATCH] Moved pv_cmd setup. --- backup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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