Removed err check for sqldump, replaced w/ dumpfile > 0 existance check
This commit is contained in:
parent
93a0cce519
commit
9bd6c9d431
@ -565,15 +565,17 @@ fi
|
|||||||
### Dump SQL
|
### Dump SQL
|
||||||
echo -e "${op}${stamp} Dumping mailcow SQL database...${normal}" >> "$logFile"
|
echo -e "${op}${stamp} Dumping mailcow SQL database...${normal}" >> "$logFile"
|
||||||
docker-compose exec mysql-mailcow mysqldump --default-character-set=utf8mb4 -u${DBUSER} -p${DBPASS} ${DBNAME} > "$sqlDumpDir/$sqlDumpFile" 2>> "$logFile"
|
docker-compose exec mysql-mailcow mysqldump --default-character-set=utf8mb4 -u${DBUSER} -p${DBPASS} ${DBNAME} > "$sqlDumpDir/$sqlDumpFile" 2>> "$logFile"
|
||||||
checkResult=$(docker-compose exec -T mysql-mailcow echo $?)
|
## error checking sqldump within the container in a cron-friendly manner is a
|
||||||
# verify sql dump was successful
|
## nightmare, so let's just see if a non-empty file with the expected name was
|
||||||
if [ "$checkResult" = 0 ]; then
|
## created
|
||||||
echo -e "${ok}${stamp} -- [SUCCESS] SQL successfully dumped --${normal}" \
|
checkExist fs "$sqlDumpDir/$sqlDumpFile"
|
||||||
>> "$logFile"
|
checkResult="$?"
|
||||||
else
|
if [ "$checkResult" = "0" ]; then
|
||||||
exitError+=("${stamp}_201")
|
echo -e "${ok}${stamp} -- [SUCCESS] SQL successfully dumped --" \
|
||||||
fi
|
"${normal}" >> "$logFile"
|
||||||
|
else
|
||||||
|
exitError+=("${stamp}_201")
|
||||||
|
fi
|
||||||
|
|
||||||
### Save redis state
|
### Save redis state
|
||||||
echo -e "${op}${stamp} Saving redis state information...${normal}" >> "$logFile"
|
echo -e "${op}${stamp} Saving redis state information...${normal}" >> "$logFile"
|
||||||
|
Loading…
Reference in New Issue
Block a user