mirror of
https://asciireactor.com/o4data/zfs-backup.git
synced 2024-11-25 06:05:08 +00:00
Improved command formatting.
This commit is contained in:
parent
d41208cdfe
commit
7c914b7a60
18
backup.sh
18
backup.sh
@ -203,10 +203,8 @@ send_latest()
|
|||||||
origin_snapshot=`get_latest_snapshot $dataset`
|
origin_snapshot=`get_latest_snapshot $dataset`
|
||||||
send_cmd="zfs send $ZFS_SEND_OPTS $dataset@$origin_snapshot"
|
send_cmd="zfs send $ZFS_SEND_OPTS $dataset@$origin_snapshot"
|
||||||
pv_cmd="pv -qL ${speed:-$DEF_SPEED}"
|
pv_cmd="pv -qL ${speed:-$DEF_SPEED}"
|
||||||
recv_cmd="
|
recv_cmd="ssh $SSH_SEND_OPTS -o port=$ssh_port $user@$addr \
|
||||||
ssh $SSH_SEND_OPTS -o port=$ssh_port $user@$addr \
|
zfs recv $ZFS_RECV_OPTS $zroot$remote_dataset"
|
||||||
zfs recv $ZFS_RECV_OPTS $zroot$remote_dataset
|
|
||||||
"
|
|
||||||
run_send_recv
|
run_send_recv
|
||||||
done
|
done
|
||||||
done < sendnodes.tmp
|
done < sendnodes.tmp
|
||||||
@ -227,15 +225,11 @@ send_increment()
|
|||||||
dataset=`echo $dataset|cut -d: -f1`
|
dataset=`echo $dataset|cut -d: -f1`
|
||||||
origin_snapshot=`get_latest_snapshot`
|
origin_snapshot=`get_latest_snapshot`
|
||||||
remote_snapshot=`get_latest_remote_snapshot`
|
remote_snapshot=`get_latest_remote_snapshot`
|
||||||
send_cmd="
|
send_cmd="zfs send $ZFS_SEND_OPTS -i $dataset@$remote_snapshot \
|
||||||
zfs send $ZFS_SEND_OPTS -i $dataset@$remote_snapshot \
|
$dataset@$origin_snapshot"
|
||||||
$dataset@$origin_snapshot
|
|
||||||
"
|
|
||||||
pv_cmd="pv -qL ${speed:-$DEF_SPEED}"
|
pv_cmd="pv -qL ${speed:-$DEF_SPEED}"
|
||||||
recv_cmd="
|
recv_cmd="ssh $SSH_SEND_OPTS -o port=$ssh_port $user@$addr \
|
||||||
ssh $SSH_SEND_OPTS -o port=$ssh_port $user@$addr \
|
zfs recv $ZFS_RECV_OPTS $zroot$remote_dataset"
|
||||||
zfs recv $ZFS_RECV_OPTS $zroot$remote_dataset
|
|
||||||
"
|
|
||||||
run_send_recv
|
run_send_recv
|
||||||
done
|
done
|
||||||
done < sendnodes.tmp
|
done < sendnodes.tmp
|
||||||
|
Loading…
Reference in New Issue
Block a user