compressing of db is now after server is back up

This commit is contained in:
Carlos Galindo 2019-10-07 13:22:27 +02:00
parent 07f4f4e5fb
commit 51ce34c363
Signed by: kauron
GPG key ID: 83E68706DEE119A3

View file

@ -46,6 +46,10 @@ echo -n "Backing up ${dbName} database..."
mysqldump --single-transaction -h localhost -u "${dbUser}" -p"${dbPassword}" "${dbName}" > "${dateDir}/${dbName}.sql"
echo " OK"
echo -n "Starting service ${service}..."
systemctl start "${service}"
echo " OK"
echo -n "Compressing backed up database..."
pushd "${dateDir}" > /dev/null
xz -9 "${dbName}.sql"
@ -53,10 +57,6 @@ sha256sum * > sha256sums
popd > /dev/null
echo " OK"
echo -n "Starting service ${service}..."
systemctl start "${service}"
echo " OK"
if (( ${maxBackups} != 0 ))
then
nrOfBackups=$(ls -l ${outDir} | grep -c ^d)