mirror of
https://git.bashclub.org/bashclub/zsync.git
synced 2024-11-22 14:05:21 +01:00
Improve log messages
This commit is contained in:
parent
23247bcb9b
commit
120e057ea2
@ -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\nmin_keep=$min_keep\n"
|
log "Configuration:\n\ttarget=$target\n\ttag=$tag\n\tsubvol_source=$subvol_source\n\tsnapshot_filter=$snapshot_filter\n\tmin_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\nmin_keep=$min_keep\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\n\tmin_keep=$min_keep\n"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
@ -111,17 +111,17 @@ 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)
|
||||||
if [[ "$(echo $zvol | cut -f2)" == "subvols" ]] && [[ $(echo $zvol | grep -E $subvol_source) ]]; then
|
if [[ "$(echo $zvol | cut -f2)" == "subvols" ]] && [[ $(echo $zvol | grep -E $subvol_source) ]]; then
|
||||||
include_list="${include_list}${name}\n"
|
include_list="${include_list}\t${name}\n"
|
||||||
syncvols=("${syncvols[@]}" "$name")
|
syncvols=("${syncvols[@]}" "$name")
|
||||||
elif [[ "$(echo $zvol | cut -f2)" == "all" ]];then
|
elif [[ "$(echo $zvol | cut -f2)" == "all" ]];then
|
||||||
include_list="${include_list}${name}\n"
|
include_list="${include_list}\t${name}\n"
|
||||||
syncvols=("${syncvols[@]}" "$name")
|
syncvols=("${syncvols[@]}" "$name")
|
||||||
else
|
else
|
||||||
exclude_list="${exclude_list}${name}\n"
|
exclude_list="${exclude_list}\t${name}\n"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
log "$include_list\n"
|
log "$include_list"
|
||||||
log "$exclude_list\n"
|
log "$exclude_list"
|
||||||
|
|
||||||
|
|
||||||
for name in "${syncvols[@]}"; do
|
for name in "${syncvols[@]}"; do
|
||||||
|
Loading…
Reference in New Issue
Block a user