From: Bastian Dehn Date: Tue, 19 May 2026 15:22:37 +0000 (+0200) Subject: add hostpath with localhost X-Git-Tag: v1.0.1^2~1 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=18a4813be57319d92b765c0ef5964511316b4bd3;p=simple-backup.git add hostpath with localhost --- 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 $?