Add log messages
This commit is contained in:
parent
a817abbe2d
commit
6e1d973f61
@ -86,10 +86,10 @@ if [[ $source == "" ]]; then
|
|||||||
log "source is empty, switching to local mode."
|
log "source is empty, switching to local mode."
|
||||||
ssh=
|
ssh=
|
||||||
sshport=
|
sshport=
|
||||||
log "Configuration:\n\ttarget=$target\n\ttag=$tag\n\tsubvol_source=$subvol_source\n\tsnapshot_filter=$snapshot_filter\n"
|
log "Configuration:\n\ttarget=$target\n\ttag=$tag\n\tsubvol_source=$subvol_source\n\tsnapshot_filter=$snapshot_filter\nmin_keep=$min_keep\n"
|
||||||
else
|
else
|
||||||
sshport=-p$sshport
|
sshport=-p$sshport
|
||||||
log "Configuration:\n\ttarget=$target\n\tsource=$source\n\tsshport=$sshport\n\ttag=$tag\n\tsubvol_source=$subvol_source\n\tsnapshot_filter=$snapshot_filter\n"
|
log "Configuration:\n\ttarget=$target\n\tsource=$source\n\tsshport=$sshport\n\ttag=$tag\n\tsubvol_source=$subvol_source\n\tsnapshot_filter=$snapshot_filter\nmin_keep=$min_keep\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -98,11 +98,14 @@ remote_aes=$($ssh $source $sshport "/usr/bin/grep -m1 -o aes /proc/cpuinfo | uni
|
|||||||
|
|
||||||
|
|
||||||
if [[ $local_aes == "aes" ]] && [[ $remote_aes == "aes" ]]; then
|
if [[ $local_aes == "aes" ]] && [[ $remote_aes == "aes" ]]; then
|
||||||
|
if [[ $debug == "-v" ]]; then log "[DEBUG] Switching to cipher aes256-gcm@openssh.com"; fi
|
||||||
sshcipher=-caes256-gcm@openssh.com
|
sshcipher=-caes256-gcm@openssh.com
|
||||||
|
else
|
||||||
|
if [[ $debug == "-v" ]]; then log "[DEBUG] Using default cipher chacha20-poly1305@openssh.com"; fi
|
||||||
|
sshcipher=-cchacha20-poly1305@openssh.com
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# query source datasets/subvols to replicate
|
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
for zvol in $($ssh $sshcipher $sshport $source "zfs get -H -o name,value,source -t filesystem,volume $tag"); do
|
for zvol in $($ssh $sshcipher $sshport $source "zfs get -H -o name,value,source -t filesystem,volume $tag"); do
|
||||||
name=$(echo $zvol | cut -f1)
|
name=$(echo $zvol | cut -f1)
|
||||||
|
Loading…
Reference in New Issue
Block a user