Reset after testing.

Removed old sqlDumpDir check.
This commit is contained in:
Asif Bacchus 2018-09-06 01:58:31 -06:00
parent 0a1948fed0
commit f41c3643ce

View File

@ -52,7 +52,7 @@ err503FileName=503-backup.html
# desired directory for SQLdump -- will be created if necessary # desired directory for SQLdump -- will be created if necessary
# (default: /SQLdump) # (default: /SQLdump)
sqlDumpDir=/SQLdump/dump sqlDumpDir=/SQLdump
# FULL path to SQL details file (explained in blog) # FULL path to SQL details file (explained in blog)
# This is a 4 line file in the EXACT format: # This is a 4 line file in the EXACT format:
@ -231,26 +231,6 @@ if [ "$checkResult" = "1" ]; then
checkExist verify $sqlDumpDir checkExist verify $sqlDumpDir
fi fi
quit
if [ -e $sqlDumpDir ]; then
echo -e "\e[0m[`date +%Y-%m-%d` `date +%H:%M:%S`] Confirmed:" \
"sqlDumpDir exists at \e[0;33m$sqlDumpDir\e[0m" >> $logFile
else
echo -e "\e[0;36m[`date +%Y-%m-%d` `date +%H:%M:%S`] Creating:" \
"\e[0;33m$sqlDumpDir\e[0;36m..." >> $logFile
mkdir $sqlDumpDir &>> $logFile
# confirm creation successful
if [ -e $sqlDumpDir ]; then
echo -e "...done\e[0m" >> $logFile
else
echo -e "\e[1;31m[`date +%Y-%m-%d` `date +%H:%M:%S`]" \
"--Error-- There was a problem creating $sqlDumpDir." >> $logFile
echo -e "\e[4;31m--Error-- Script aborted\e[0;31m.\e[0m" >> $logFile
exit 200
fi
fi
## Create unique filename for sqlDump file ## Create unique filename for sqlDump file
sqlDumpFile="backup_${DBNAME}_`date +%Y%m%d_%H%M%S`.sql" sqlDumpFile="backup_${DBNAME}_`date +%Y%m%d_%H%M%S`.sql"
echo -e "\e[0m[`date +%Y-%m-%d` `date +%H:%M:%S`] mysql dump file will be" \ echo -e "\e[0m[`date +%Y-%m-%d` `date +%H:%M:%S`] mysql dump file will be" \