mirror of
https://asciireactor.com/o4data/zfs-backup.git
synced 2024-11-24 18:05:06 +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`
|
||||
send_cmd="zfs send $ZFS_SEND_OPTS $dataset@$origin_snapshot"
|
||||
pv_cmd="pv -qL ${speed:-$DEF_SPEED}"
|
||||
recv_cmd="
|
||||
ssh $SSH_SEND_OPTS -o port=$ssh_port $user@$addr \
|
||||
zfs recv $ZFS_RECV_OPTS $zroot$remote_dataset
|
||||
"
|
||||
recv_cmd="ssh $SSH_SEND_OPTS -o port=$ssh_port $user@$addr \
|
||||
zfs recv $ZFS_RECV_OPTS $zroot$remote_dataset"
|
||||
run_send_recv
|
||||
done
|
||||
done < sendnodes.tmp
|
||||
@ -227,15 +225,11 @@ send_increment()
|
||||
dataset=`echo $dataset|cut -d: -f1`
|
||||
origin_snapshot=`get_latest_snapshot`
|
||||
remote_snapshot=`get_latest_remote_snapshot`
|
||||
send_cmd="
|
||||
zfs send $ZFS_SEND_OPTS -i $dataset@$remote_snapshot \
|
||||
$dataset@$origin_snapshot
|
||||
"
|
||||
send_cmd="zfs send $ZFS_SEND_OPTS -i $dataset@$remote_snapshot \
|
||||
$dataset@$origin_snapshot"
|
||||
pv_cmd="pv -qL ${speed:-$DEF_SPEED}"
|
||||
recv_cmd="
|
||||
ssh $SSH_SEND_OPTS -o port=$ssh_port $user@$addr \
|
||||
zfs recv $ZFS_RECV_OPTS $zroot$remote_dataset
|
||||
"
|
||||
recv_cmd="ssh $SSH_SEND_OPTS -o port=$ssh_port $user@$addr \
|
||||
zfs recv $ZFS_RECV_OPTS $zroot$remote_dataset"
|
||||
run_send_recv
|
||||
done
|
||||
done < sendnodes.tmp
|
||||
|
Loading…
Reference in New Issue
Block a user