Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| aa2c17799c | |||
| 1334975cab | |||
| 19d1eb1587 |
@@ -20,8 +20,10 @@
|
|||||||
# default is "$HOME" or "~$USER" in that order. If you're unsure, try "$HOME"
|
# default is "$HOME" or "~$USER" in that order. If you're unsure, try "$HOME"
|
||||||
borgBaseDir="/var/borgbackup"
|
borgBaseDir="/var/borgbackup"
|
||||||
|
|
||||||
# SSH port on which your borg server listens. By default, this is port 22.
|
# SSH port on which your borg server listens. To connect on a custom port,
|
||||||
borgSSHPort = 22
|
# uncomment the line below and change the port number as required.
|
||||||
|
# If you leave this line commented, the default (port 22) will be used.
|
||||||
|
#borgSSHPort=22
|
||||||
|
|
||||||
# full path to the SSH key used to connect to your remote backup server
|
# full path to the SSH key used to connect to your remote backup server
|
||||||
borgSSHKey="/var/borgbackup/private.key"
|
borgSSHKey="/var/borgbackup/private.key"
|
||||||
|
|||||||
+5
-5
@@ -257,7 +257,7 @@ trapExit() {
|
|||||||
## script related
|
## script related
|
||||||
# store logfile in the same directory as this script file using the same file
|
# store logfile in the same directory as this script file using the same file
|
||||||
# name as the script but with the extension '.log'
|
# name as the script but with the extension '.log'
|
||||||
scriptPath="$( CDPATH='' cd -- "$( dirname -- "$0" )" && pwd -P )"
|
scriptPath="$( CDPATH='' \cd -- "$( dirname -- "$0" )" && pwd -P )"
|
||||||
scriptName="$( basename "$0" )"
|
scriptName="$( basename "$0" )"
|
||||||
logFile="$scriptPath/${scriptName%.*}.log"
|
logFile="$scriptPath/${scriptName%.*}.log"
|
||||||
colourizeLogFile=1
|
colourizeLogFile=1
|
||||||
@@ -593,7 +593,7 @@ fi
|
|||||||
## export borg remote path, if specified
|
## export borg remote path, if specified
|
||||||
if [ -n "${borgRemote}" ]; then export BORG_REMOTE_PATH="${borgRemote}"; fi
|
if [ -n "${borgRemote}" ]; then export BORG_REMOTE_PATH="${borgRemote}"; fi
|
||||||
|
|
||||||
## check if exlusion list file is specified
|
## check if exclusion list file is specified
|
||||||
if [ -n "${borgExcludeListPath}" ]; then
|
if [ -n "${borgExcludeListPath}" ]; then
|
||||||
# check if the file actually exists
|
# check if the file actually exists
|
||||||
if [ ! -f "${borgExcludeListPath}" ]; then
|
if [ ! -f "${borgExcludeListPath}" ]; then
|
||||||
@@ -661,7 +661,7 @@ if [ "$use503" -eq 1 ]; then
|
|||||||
printf "%s[%s] -- [INFO] Copying 503 error page to " \
|
printf "%s[%s] -- [INFO] Copying 503 error page to " \
|
||||||
"$cyan" "$(stamp)" >> "$logFile"
|
"$cyan" "$(stamp)" >> "$logFile"
|
||||||
printf "webroot -- %s\n" "$norm">> "$logFile"
|
printf "webroot -- %s\n" "$norm">> "$logFile"
|
||||||
if ! cp --force "${err503Path}" "${webroot}/${err503File}" 2>> "$logFile"
|
if ! \cp --force "${err503Path}" "${webroot}/${err503File}" 2>> "$logFile"
|
||||||
then
|
then
|
||||||
printf "%s[%s] -- [WARNING] Failed to copy 503 error page. " \
|
printf "%s[%s] -- [WARNING] Failed to copy 503 error page. " \
|
||||||
"$warn" "$(stamp)" >> "$logFile"
|
"$warn" "$(stamp)" >> "$logFile"
|
||||||
@@ -703,7 +703,7 @@ docker-compose exec -T mysql-mailcow mysqldump --default-character-set=utf8mb4 \
|
|||||||
dumpResult=$( docker-compose exec -T mysql-mailcow echo "$?" )
|
dumpResult=$( docker-compose exec -T mysql-mailcow echo "$?" )
|
||||||
if [ "$dumpResult" -eq 0 ]; then
|
if [ "$dumpResult" -eq 0 ]; then
|
||||||
printf "%s[%s] -- [INFO] SQL database dumped successfully --%s\n" \
|
printf "%s[%s] -- [INFO] SQL database dumped successfully --%s\n" \
|
||||||
"cyan" "$(stamp)" "$norm" >> "$logFile"
|
"$cyan" "$(stamp)" "$norm" >> "$logFile"
|
||||||
else
|
else
|
||||||
exitError 118 'There was an error dumping the mailcow SQL database.'
|
exitError 118 'There was an error dumping the mailcow SQL database.'
|
||||||
fi
|
fi
|
||||||
@@ -721,7 +721,7 @@ docker-compose exec -T redis-mailcow redis-cli save >> "$logFile" 2>&1
|
|||||||
rdumpResult=$( docker-compose exec -T redis-mailcow echo "$?" )
|
rdumpResult=$( docker-compose exec -T redis-mailcow echo "$?" )
|
||||||
if [ "$rdumpResult" -eq 0 ]; then
|
if [ "$rdumpResult" -eq 0 ]; then
|
||||||
printf "%s[%s] -- [INFO] mailcow redis dumped successfully --%s\n" \
|
printf "%s[%s] -- [INFO] mailcow redis dumped successfully --%s\n" \
|
||||||
"cyan" "$(stamp)" "$norm" >> "$logFile"
|
"$cyan" "$(stamp)" "$norm" >> "$logFile"
|
||||||
else
|
else
|
||||||
exitError 119 'There was an error dumping the mailcow redis database.'
|
exitError 119 'There was an error dumping the mailcow redis database.'
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user