From edaf41f1aff6eed8d3b0b22e56f1aff37452153a Mon Sep 17 00:00:00 2001 From: Clemens Schwaighofer Date: Tue, 29 Mar 2022 09:57:12 +0900 Subject: [PATCH] Repository ID info, borg command call via variable The main info block gets Repository ID as info too (for cache/etc folders check) Missing borg command as variable for borg list command. --- borg.backup.functions.check.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/borg.backup.functions.check.sh b/borg.backup.functions.check.sh index 14a2386..4e8ec09 100644 --- a/borg.backup.functions.check.sh +++ b/borg.backup.functions.check.sh @@ -76,7 +76,9 @@ elif [ ! -z "${TARGET_HOST}" ]; then fi; # we dont allow special characters, so we don't need to special escape it REPOSITORY="${TARGET_SERVER}${TARGET_FOLDER}${BACKUP_FILE}"; +REPOSITORY_ID=$(${BORG_COMMAND} config ${OPT_REMOTE} ${REPOSITORY} id); echo "Repository : ${REPOSITORY}"; +echo "Repository ID : ${REPOSITORY_ID}"; # check compression if given is valid and check compression level is valid if given OPT_COMPRESSION=''; @@ -311,7 +313,7 @@ if [ ${PRINT} -eq 1 ]; then fi; # run info command if not a dry drun if [ ${DRYRUN} -eq 0 ]; then - borg list ${OPT_REMOTE} --format "${FORMAT}" ${REPOSITORY} ; + ${BORG_COMMAND} list ${OPT_REMOTE} --format "${FORMAT}" ${REPOSITORY} ; fi; if [ ${VERBOSE} -eq 1 ]; then echo "";