|
@@ -208,7 +208,7 @@ function backup_database_local {
|
208
|
208
|
fi
|
209
|
209
|
echo $"Obtaining ${1} database backup"
|
210
|
210
|
mysqldump --lock-tables --password="$DATABASE_PASSWORD" ${1} > ${local_database_dir}/${1}.sql
|
211
|
|
- if [ ! -f ${local_database_dir}/${1}.sql ]; then
|
|
211
|
+ if [ -f ${local_database_dir}/${1}.sql ]; then
|
212
|
212
|
if [ ! -s ${local_database_dir}/${1}.sql ]; then
|
213
|
213
|
echo $"${1} database could not be saved"
|
214
|
214
|
shred -zu ${local_database_dir}/*
|
|
@@ -392,7 +392,7 @@ function backup_database_remote {
|
392
|
392
|
fi
|
393
|
393
|
echo "Obtaining ${1} database backup"
|
394
|
394
|
mysqldump --password=$DATABASE_PASSWORD ${1} > ${local_database_dir}/${1}.sql
|
395
|
|
- if [ ! -f ${local_database_dir}/${1}.sql ]; then
|
|
395
|
+ if [ -f ${local_database_dir}/${1}.sql ]; then
|
396
|
396
|
if [ ! -s ${local_database_dir}/${1}.sql ]; then
|
397
|
397
|
echo $"${1} database could not be saved"
|
398
|
398
|
shred -zu ${local_database_dir}/*
|