Compare commits
3 Commits
8e30cb4048
...
ed62bb1e38
Author | SHA1 | Date |
---|---|---|
Asif Bacchus | ed62bb1e38 | |
Asif Bacchus | 3a759f39ac | |
Asif Bacchus | 5cd023010c |
|
@ -1,9 +1,9 @@
|
||||||
# Location of your script's log file, -l parameter
|
# Location of your script's log file, -l parameter
|
||||||
LogFile = /path/to/your/backup.log
|
LogFile = /path/to/your/seafbackup.log
|
||||||
|
|
||||||
# Format of logrotate archives for your script. Example assumes compression and
|
# Format of logrotate archives for your script. Example assumes compression and
|
||||||
# extension preservation
|
# extension preservation
|
||||||
Archive = /path/to/your/logfile.ext.?.gz
|
Archive = /path/to/your/seafbackup.log.?.gz
|
||||||
|
|
||||||
# Apply the correct date/time filtering to match the format of the script's log
|
# Apply the correct date/time filtering to match the format of the script's log
|
||||||
# We are using a custom pl script in /etc/logwatch/scripts/shared/ You don't
|
# We are using a custom pl script in /etc/logwatch/scripts/shared/ You don't
|
|
@ -1,5 +1,5 @@
|
||||||
# Name of the logfile group without any extension
|
# Name of the logfile group without any extension
|
||||||
LogFile = backup
|
LogFile = seafbackup
|
||||||
|
|
||||||
# Heading displayed on Logwatch's report for this service
|
# Heading displayed on Logwatch's report for this service
|
||||||
Title = "System and Seafile Backup"
|
Title = "System and Seafile Backup"
|
|
@ -34,7 +34,7 @@ if ($detailLevel == 0) {
|
||||||
elsif ($ThisLine =~ /\-- \[WARNING\] /) {
|
elsif ($ThisLine =~ /\-- \[WARNING\] /) {
|
||||||
$summaryWarn++;
|
$summaryWarn++;
|
||||||
}
|
}
|
||||||
elsif ($ThisLine =~ /All processes completed successfully/) {
|
elsif ($ThisLine =~ /All processes completed/) {
|
||||||
$summarySuccess++;
|
$summarySuccess++;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -165,9 +165,8 @@ scriptHelp () {
|
||||||
|
|
||||||
printf "More details and examples of script usage can be found in the "
|
printf "More details and examples of script usage can be found in the "
|
||||||
printf "repo wiki at\n"
|
printf "repo wiki at\n"
|
||||||
printf "${yellow}https://git.asifbacchus.app/asif/seafileBackup.git"
|
printf "${yellow}https://git.asifbacchus.app/BacchusGroup/seafileBackup"
|
||||||
printf "/wiki${norm}.\n"
|
printf "/wiki${norm}.\n"
|
||||||
|
|
||||||
printf "${cyan}%s${norm}\n\n" "--------------------------------------------------------------------------------"
|
printf "${cyan}%s${norm}\n\n" "--------------------------------------------------------------------------------"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -230,7 +229,7 @@ scriptPath="$( CDPATH='' cd -- "$( dirname -- "$0" )" && pwd -P )"
|
||||||
scriptName="$( basename "$0" )"
|
scriptName="$( basename "$0" )"
|
||||||
logFile="$scriptPath/${scriptName%.*}.log"
|
logFile="$scriptPath/${scriptName%.*}.log"
|
||||||
warnCount=0
|
warnCount=0
|
||||||
configDetails="$scriptPath/seafbackup.details"
|
configDetails="$scriptPath/${scriptName%.*}.details"
|
||||||
err503Copied=0
|
err503Copied=0
|
||||||
sqlCopied=0
|
sqlCopied=0
|
||||||
includeXtra=0
|
includeXtra=0
|
||||||
|
@ -537,7 +536,7 @@ if ! mysqldump -h"${sqlServer}" -u"${sqlUser}" -p"${sqlPass}" \
|
||||||
--opt "${seahubDB_name}" > "${sqlDumpDir}/${sqlDump_seahub}" 2>> "$logFile"; then
|
--opt "${seahubDB_name}" > "${sqlDumpDir}/${sqlDump_seahub}" 2>> "$logFile"; then
|
||||||
exitError 117 "Could not dump ${seahubDB_name} database"
|
exitError 117 "Could not dump ${seahubDB_name} database"
|
||||||
fi
|
fi
|
||||||
printf "${ok}[%s] -- [SUCCESS] SQL databases dumped successfully --${norm}\n" \
|
printf "${ok}[%s] -- [SUCCESS] Dumped SQL databases --${norm}\n" \
|
||||||
"$(stamp)" >> "$logFile"
|
"$(stamp)" >> "$logFile"
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue