From 5c2907e5e82a4f1ee7e444c91dd347f15684249d Mon Sep 17 00:00:00 2001 From: Otho Date: Mon, 16 Jan 2023 22:58:23 -0500 Subject: [PATCH] Improved default speed variable name. --- backup.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backup.sh b/backup.sh index e64e598..e6dc4c9 100755 --- a/backup.sh +++ b/backup.sh @@ -1,5 +1,7 @@ #!/usr/bin/env sh +# requires zfs, pv, ssh + nodes_file="nodes.txt" ### nodes.txt # @@ -22,7 +24,7 @@ ZFS_SEND_OPTS="-pRLe" ZFS_SNAPSHOT_OPTS="-r" ZFS_RECV_OPTS="-vsu" SSH_SEND_OPTS="-Ti ~/.ssh/id_rsa" -DEF_SPEED="20M" +DEFAULT_SPEED="20M" read LOCAL_HOST LOCAL_USER LOCAL_PORT LOCAL_TZ SEND_COMPRESSED < $nodes_file @@ -218,7 +220,7 @@ 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:-$DEF_SPEED}" + pv_cmd="pv -qL ${speed:-$DEFAULT_SPEED}" recv_cmd="zfs recv $ZFS_RECV_OPTS $zroot$rset" run_send_recv done @@ -241,7 +243,7 @@ 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:-$DEF_SPEED}" + pv_cmd="pv -qL ${speed:-$DEFAULT_SPEED}" recv_cmd="zfs recv $ZFS_RECV_OPTS $zroot$rset" run_send_recv done