mirror of
https://asciireactor.com/o4data/zfs-backup.git
synced 2024-11-24 04:05:06 +00:00
Improved default speed variable name.
This commit is contained in:
parent
a8cc409180
commit
5c2907e5e8
@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# requires zfs, pv, ssh
|
||||
|
||||
nodes_file="nodes.txt"
|
||||
### nodes.txt
|
||||
# <origin host> <user> <ssh port> <timezone> <compressed flag>
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user