If localhost is also borg backup host, then access repository directly (not over ssh).

This commit is contained in:
2025-07-26 23:34:23 +02:00
parent bd20e94482
commit 1b3af2ff9e
5 changed files with 25 additions and 5 deletions

View File

@ -343,7 +343,11 @@ done
#
BORG_BACKUP_DIRS="${BORG_BACKUP_DIRS#"${BORG_BACKUP_DIRS%%[![:space:]]*}"}"
BORG_URL="ssh://${SSH_USER}@${BORG_HOST}:${SSH_PORT}${BORG_REPO}"
if [[ "${BORG_HOST,,}" == "localhost" ]] ; then
BORG_URL="file://${BORG_REPO}"
else
BORG_URL="ssh://${SSH_USER}@${BORG_HOST}:${SSH_PORT}${BORG_REPO}"
fi
#BORG_REPO="${BORG_URL}"