quoted path-related vars to prevent issues with spaces in path

This commit is contained in:
Asif Bacchus 2019-01-30 12:27:54 -07:00
parent 82f80d0f83
commit 3ddc2c5d4a

View File

@ -797,21 +797,21 @@ if [ -z "$borgExclude" ]; then
echo -e "${bold}${op}[$(stamp)] Executing borg without exclusions${normal}" \
>> "$logFile"
borg --show-rc create ${borgCreateParams} ::`date +%Y-%m-%d_%H%M%S` \
${xtraFiles[@]} \
${sqlDumpDir} \
${dockerVolumeMail} ${dockerVolumeRspamd} ${dockerVolumePostfix} \
${dockerVolumeRedis} ${dockerVolumeCrypt} \
"${xtraFiles[@]}" \
"${sqlDumpDir}" \
"${dockerVolumeMail}" "${dockerVolumeRspamd}" "${dockerVolumePostfix}" \
"${dockerVolumeRedis}" "${dockerVolumeCrypt}" \
2>> "$logFile"
else
# borgExclude is not empty
echo -e "${bold}${op}[$(stamp)] Executing borg with exclusions${normal}" \
>> "$logFile"
borg --show-rc create ${borgCreateParams} --exclude-from ${borgExclude} \
borg --show-rc create ${borgCreateParams} --exclude-from "${borgExclude}" \
::`date +%Y-%m-%d_%H%M%S` \
${xtraFiles[@]} \
${sqlDumpDir} \
${dockerVolumeMail} ${dockerVolumeRspamd} ${dockerVolumePostfix} \
${dockerVolumeRedis} ${dockerVolumeCrypt} \
"${xtraFiles[@]}" \
"${sqlDumpDir}" \
"${dockerVolumeMail}" "${dockerVolumeRspamd}" "${dockerVolumePostfix}" \
"${dockerVolumeRedis}" "${dockerVolumeCrypt}" \
2>> "$logFile"
fi