Redirected output from borg to logfile

This commit is contained in:
Asif Bacchus 2018-10-14 07:09:01 -06:00
parent 724182a15e
commit 5e148150e6

View File

@ -516,7 +516,8 @@ if [ -z "$borgExclude" ]; then
>> "$logFile"
borg --show-rc create ${borgCreateParams} :: `date +%Y-%m-%d_%H%M%S` \
"${xtraFiles[@]}" \
"${sqlDumpDir}" "${ncDataDir}"
"${sqlDumpDir}" "${ncDataDir}" \
2>> "$logFile"
else
# borgExclude is not empty
echo -e "${op}${stamp} Executing borg with exclusions${normal}" \
@ -524,7 +525,8 @@ else
borg --show-rc create ${borgCreateParams} --exclude-from "${borgExclude}" \
:: `date +%Y-%m-%d_%H%M%S` \
"${xtraFiles[@]}" \
"${sqlDumpDir}" "${ncDataDir}"
"${sqlDumpDir}" "${ncDataDir}" \
2>> "$logFile"
fi
## Check status of borg operation