mirror of
https://asciireactor.com/o4data/zfs-backup.git
synced 2024-11-21 22:25:06 +00:00
Fixed order of operation.
This commit is contained in:
parent
6ecc55fb6c
commit
6abf246f8d
12
backup.sh
12
backup.sh
@ -24,10 +24,6 @@ SSH_SEND_OPTS="-Ti ~/.ssh/id_rsa"
|
||||
DEF_SPEED="20M"
|
||||
|
||||
read LOCAL_HOST LOCAL_USER LOCAL_PORT LOCAL_TZ SEND_COMPRESSED < $nodes_file
|
||||
case $SEND_COMPRESSED in
|
||||
[tTyY]*) ZFS_SEND_OPTS="$ZFS_SEND_OPTS -c"
|
||||
debug "Enabled send as compressed datasets." ;;
|
||||
esac
|
||||
|
||||
ORIGIN_PERMS="send,snapshot,hold"
|
||||
MIRROR_PERMS="compression,receive,create,mount,mountpoint,readonly,jailed"
|
||||
@ -42,6 +38,13 @@ debug()
|
||||
fi
|
||||
}
|
||||
|
||||
set_compression() {
|
||||
case $SEND_COMPRESSED in
|
||||
[tTyY]*) ZFS_SEND_OPTS="$ZFS_SEND_OPTS -c"
|
||||
debug "Enabled send as compressed datasets." ;;
|
||||
esac
|
||||
}
|
||||
|
||||
populate_datasets()
|
||||
{
|
||||
while read dataset dataset_options; do
|
||||
@ -272,6 +275,7 @@ done
|
||||
|
||||
tail -n +2 $nodes_file|grep -v '^#' > sendnodes.tmp
|
||||
|
||||
set_compression
|
||||
populate_datasets
|
||||
|
||||
### Command
|
||||
|
Loading…
Reference in New Issue
Block a user