update borgbackup cmd to include seaf dirs

This commit is contained in:
Asif Bacchus 2019-05-20 00:01:50 -06:00
parent 21da2e51de
commit dab92e54c0

View File

@ -134,7 +134,7 @@ function scriptHelp {
echo -e "${lit}\n-s, Location of file with mySQL details${default}" echo -e "${lit}\n-s, Location of file with mySQL details${default}"
echo -e "FULL PATH to the plain text file containing all information" \ echo -e "FULL PATH to the plain text file containing all information" \
"needed to connect" "needed to connect"
echo -e "to your mySQL (mariaDB) server and Seafile database. Details" \ echo -e "to your mySQL (mariaDB) server and Seafile databases. Details" \
"on the structure" "on the structure"
echo -e "of this file are in the readme and on${lit}" \ echo -e "of this file are in the readme and on${lit}" \
"https://mytechiethoughts.com${default}" "https://mytechiethoughts.com${default}"
@ -578,7 +578,7 @@ echo -e "${op}[$(stamp)] Pre-backup tasks completed, calling borgbackup..." \
## Get borgbackup settings and repo details ## Get borgbackup settings and repo details
# read definition file and map to array variable # read definition file and map to array variable
mapfile -t borgConfig < "$borgDetails" mapfile -t borgConfig < "$borgDetails"
## check if any required borg configuration variables in defintion file are ## check if any required borg configuration variables in definition file are
## empty and exit with error, otherwise, map array items to variables ## empty and exit with error, otherwise, map array items to variables
# check: borg base directory # check: borg base directory
echo -e "${op}[$(stamp)] Verifying supplied borg configuration variables..." \ echo -e "${op}[$(stamp)] Verifying supplied borg configuration variables..." \
@ -735,7 +735,9 @@ if [ -z "$borgExclude" ]; then
"${normal}" >> "$logFile" "${normal}" >> "$logFile"
borg --show-rc create ${borgCreateParams} ::"$(date +%Y-%m-%d_%H%M%S)" \ borg --show-rc create ${borgCreateParams} ::"$(date +%Y-%m-%d_%H%M%S)" \
"${xtraFiles[@]}" \ "${xtraFiles[@]}" \
"${sqlDumpDir}" "${dataDir}" \ "${seafDir}" \
"${dataDir}" \
"${sqlDumpDir}" \
2>> "$logFile" 2>> "$logFile"
else else
# borgExclude is not empty # borgExclude is not empty
@ -744,7 +746,9 @@ else
borg --show-rc create ${borgCreateParams} --exclude-from "${borgExclude}" \ borg --show-rc create ${borgCreateParams} --exclude-from "${borgExclude}" \
::"$(date +%Y-%m-%d_%H%M%S)" \ ::"$(date +%Y-%m-%d_%H%M%S)" \
"${xtraFiles[@]}" \ "${xtraFiles[@]}" \
"${sqlDumpDir}" "${dataDir}" \ "${seafDir}" \
"${dataDir}" \
"${sqlDumpDir}" \
2>> "$logFile" 2>> "$logFile"
fi fi