From 4234fb2965dc04c80490f41164415596116a9b99 Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Sat, 4 Sep 2021 17:15:56 +0200 Subject: [PATCH] btrbk-verify: cleanup --- contrib/cron/btrbk-verify | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/contrib/cron/btrbk-verify b/contrib/cron/btrbk-verify index a3c5f01..f2de8fd 100755 --- a/contrib/cron/btrbk-verify +++ b/contrib/cron/btrbk-verify @@ -365,8 +365,8 @@ while read -r btrbk_list_line; do break fi - source="${R_snapshot_subvolume}" - target="${R_target_subvolume}" + source="${R_snapshot_subvolume}/" + target="${R_target_subvolume}/" [[ -n "$R_source_host" ]] && source="${R_source_host}:${source}" [[ -n "$R_target_host" ]] && target="${R_target_host}:${target}" @@ -384,10 +384,11 @@ while read -r btrbk_list_line; do # rsync rsh is either source_rsh or target_rsh or empty eff_rsh="$R_source_rsh" [[ -z "$eff_rsh" ]] && eff_rsh="$R_target_rsh" + eff_rsh=$(rsync_rsh "$eff_rsh") rsync_cmd=("rsync" "${rsync_args[@]}") - [[ -n "$eff_rsh" ]] && rsync_cmd+=(-e "$(rsync_rsh "$eff_rsh")") - rsync_cmd+=("${source}/" "${target}/") + [[ -n "$eff_rsh" ]] && rsync_cmd+=("-e" "$eff_rsh") + rsync_cmd+=("${source}" "${target}") log_cmd "${rsync_cmd[@]}" [[ -n "$dryrun" ]] && rsync_cmd=("cat" "/dev/null")