compressing of db is now after server is back up
This commit is contained in:
parent
07f4f4e5fb
commit
51ce34c363
1 changed files with 4 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue