This commit is contained in:
Bob Mottram 2016-11-01 20:26:59 +00:00
parent d64ae7a594
commit d976dd9ba8
1 changed files with 2 additions and 2 deletions

View File

@ -208,7 +208,7 @@ function backup_database_local {
fi fi
echo $"Obtaining ${1} database backup" echo $"Obtaining ${1} database backup"
mysqldump --lock-tables --password="$DATABASE_PASSWORD" ${1} > ${local_database_dir}/${1}.sql mysqldump --lock-tables --password="$DATABASE_PASSWORD" ${1} > ${local_database_dir}/${1}.sql
if [ ! -f ${local_database_dir}/${1}.sql ]; then if [ -f ${local_database_dir}/${1}.sql ]; then
if [ ! -s ${local_database_dir}/${1}.sql ]; then if [ ! -s ${local_database_dir}/${1}.sql ]; then
echo $"${1} database could not be saved" echo $"${1} database could not be saved"
shred -zu ${local_database_dir}/* shred -zu ${local_database_dir}/*
@ -392,7 +392,7 @@ function backup_database_remote {
fi fi
echo "Obtaining ${1} database backup" echo "Obtaining ${1} database backup"
mysqldump --password=$DATABASE_PASSWORD ${1} > ${local_database_dir}/${1}.sql mysqldump --password=$DATABASE_PASSWORD ${1} > ${local_database_dir}/${1}.sql
if [ ! -f ${local_database_dir}/${1}.sql ]; then if [ -f ${local_database_dir}/${1}.sql ]; then
if [ ! -s ${local_database_dir}/${1}.sql ]; then if [ ! -s ${local_database_dir}/${1}.sql ]; then
echo $"${1} database could not be saved" echo $"${1} database could not be saved"
shred -zu ${local_database_dir}/* shred -zu ${local_database_dir}/*