execute borg

This commit is contained in:
Asif Bacchus 2019-05-27 04:19:21 -06:00
parent 87bfeb8464
commit 33416f8144
1 changed files with 23 additions and 1 deletions

View File

@ -514,10 +514,32 @@ fi
export TMPDIR="${borgBaseDir}/tmp"
### execute borg depending on whether extra files and/or exclusions are defined
## construct the proper borg commandline
# base command
if [ "$exclusions" -eq 0 ]; then
borgCMD="borg --show-rc create ${borgCreateParams} \
::$(date +%Y-%m-%d_%H%M%S) \
${seafDir} \
${seafData} \
${sqlDumpDir}"
elif [ "$exclusions" -eq 1 ]; then
borgCMD="borg --show-rc create ${borgCreateParams} \
--exclude-from ${borgExcludeListPath} \
::$(date +%Y-%m-%d_%H%M%S) \
${seafDir} \
${seafData} \
${sqlDumpDir}"
fi
# add extra locations if defined
if [ "$includeXtra" -eq 1 ]; then
borgCMD="${borgCMD} ${xtraList}"
fi
# execute borg
${borgCMD} 2>> "$logFile"
exit 0