From dab92e54c07893be46836d097e8efcbdcde60427 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Mon, 20 May 2019 00:01:50 -0600 Subject: [PATCH] update borgbackup cmd to include seaf dirs --- SeafBackup/backup.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/SeafBackup/backup.sh b/SeafBackup/backup.sh index bd206f1..15b59c9 100755 --- a/SeafBackup/backup.sh +++ b/SeafBackup/backup.sh @@ -134,7 +134,7 @@ function scriptHelp { echo -e "${lit}\n-s, Location of file with mySQL details${default}" echo -e "FULL PATH to the plain text file containing all information" \ "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" echo -e "of this file are in the readme and on${lit}" \ "https://mytechiethoughts.com${default}" @@ -578,7 +578,7 @@ echo -e "${op}[$(stamp)] Pre-backup tasks completed, calling borgbackup..." \ ## Get borgbackup settings and repo details # read definition file and map to array variable 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 # check: borg base directory echo -e "${op}[$(stamp)] Verifying supplied borg configuration variables..." \ @@ -735,7 +735,9 @@ if [ -z "$borgExclude" ]; then "${normal}" >> "$logFile" borg --show-rc create ${borgCreateParams} ::"$(date +%Y-%m-%d_%H%M%S)" \ "${xtraFiles[@]}" \ - "${sqlDumpDir}" "${dataDir}" \ + "${seafDir}" \ + "${dataDir}" \ + "${sqlDumpDir}" \ 2>> "$logFile" else # borgExclude is not empty @@ -744,7 +746,9 @@ else borg --show-rc create ${borgCreateParams} --exclude-from "${borgExclude}" \ ::"$(date +%Y-%m-%d_%H%M%S)" \ "${xtraFiles[@]}" \ - "${sqlDumpDir}" "${dataDir}" \ + "${seafDir}" \ + "${dataDir}" \ + "${sqlDumpDir}" \ 2>> "$logFile" fi