From 18a4813be57319d92b765c0ef5964511316b4bd3 Mon Sep 17 00:00:00 2001 From: Bastian Dehn Date: Tue, 19 May 2026 17:22:37 +0200 Subject: [PATCH] add hostpath with localhost --- src/backup | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/backup b/src/backup index 6380481..6ffe603 100755 --- a/src/backup +++ b/src/backup @@ -139,7 +139,10 @@ backup_remote_pathes() printf "path ${YELLOW}%s${RESET}\n\n" "$path" [ -n "$last_backup_dir_path" ] \ - && hardlinkopt="--link-dest=$last_backup_dir_path/$machine" + && local hardlinkopt="--link-dest=$last_backup_dir_path/$machine" + + local hostpath="$remote_user@$host:$path" + [ "$host" == "localhost" ] && local hostpath="$path" rsync --archive \ --verbose \ @@ -150,7 +153,7 @@ backup_remote_pathes() --human-readable \ $hardlinkopt \ --rsh "ssh -p $port" \ - $remote_user@$host:$path \ + $hostpath \ $backup_path/$machine \ || errlog "could not backup $machine with path $path" \ || return $? -- 2.47.3