From 8d7bbfcf8067329af724715c407708e65525455a Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Tue, 4 Sep 2018 20:38:09 -0600 Subject: [PATCH] Added export variables to prepare for calling BorgBackup --- root/scripts/borgbackup.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/root/scripts/borgbackup.sh b/root/scripts/borgbackup.sh index 0c3a10e..d68fcc4 100755 --- a/root/scripts/borgbackup.sh +++ b/root/scripts/borgbackup.sh @@ -202,5 +202,16 @@ else exit 102 fi +## Ready for Borg +echo -e "\e[1;39m[`date +%Y-%m-%d` `date +%H:%M:%S`] Pre-backup tasks" \ + "completed... calling BorgBackup" >> $logFile + +## Generate and export variables required for BorgBackup +export BORG_BASE_DIR="$borgBaseDir" +export BORG_REMOTE_PATH="$borgRemotePath" +export BORG_RSH="ssh -i $borgRemoteSSHKeyfile" +export BORG_REPO="$(head -1 $borgDetails)" +export BORG_PASSPHRASE="$(tail -1 $borgDetails)" + # Gracefully exit exit 0 \ No newline at end of file