Compare commits

...

3 Commits

Author SHA1 Message Date
Asif Bacchus 75368e108b update licence and export prefs 2020-08-14 00:44:51 -06:00
Asif Bacchus d0e8eca1d6 add keyfile to details file 2020-08-14 00:43:47 -06:00
Asif Bacchus b6ce0fc673 add keyfile support 2020-08-14 00:42:00 -06:00
4 changed files with 20 additions and 1 deletions

1
.gitattributes vendored
View File

@ -73,3 +73,4 @@
.gitattributes export-ignore
.gitignore export-ignore
.vscode export-ignore

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2019 Asif Bacchus
Copyright (c) 2019-2020 Asif Bacchus
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -32,6 +32,12 @@ borgConnectRepo="jdoe123@borg.server.net:pilerBackup/"
# recommended for security
borgRepoPassphrase="p@ssW0rd"
# keyfile to access repo
# FULL PATH where the associated keyfile for your repo is located -- relevant
# only if your repo requires a keyfile (i.e. 'keyfile' vs 'repokey') and if you
# are not using the default keyfile location
borgKeyfileLocation="/var/borgbackup/.config/borg/keys/server_address__repo_name"
# OPTIONAL: path to text file containing a list (one per line) of files/
# directories to include in your backup along with exported data from piler
# see repo wiki for more details

View File

@ -506,6 +506,18 @@ else
export BORG_PASSPHRASE="DummyPasswordSoBorgFails"
fi
## check borg repository keyfile location
if [ -z "${borgKeyfileLocation}" ]; then
printf "%sdetails:borgKeyfileLocation %s-- %s[DEFAULT]%s\n" "$magenta" "$norm" "$ok" "$norm" >> "$logFile"
else
# check if keyfile location exists
if [ ! -f "${borgKeyfileLocation}" ]; then
badDetails dne 'borgKeyfileLocation'
fi
printf "%sdetails:borgKeyfileLocation %s-- %s[OK]%s\n" "$magenta" "$norm" "$ok" "$norm" >> "$logFile"
export BORG_KEY_FILE="${borgKeyfileLocation}"
fi
## export borg remote path, if specified
if [ -n "${borgRemote}" ]; then export BORG_REMOTE_PATH="${borgRemote}"; fi