diff --git a/mysql/files/mysql-backup.sh b/mysql/files/mysql-backup.sh index 89c21a57..e08cbb74 100644 --- a/mysql/files/mysql-backup.sh +++ b/mysql/files/mysql-backup.sh @@ -30,7 +30,7 @@ fi if [ ! -d $MY_BACKUP_DIR/history ] ; then mkdir -p $MY_BACKUP_DIR/history fi -chmod -R 700 $MY_BACKUP_DIR +chmod 700 $MY_BACKUP_DIR LOCKFILE=$MY_DATA_DIR/.mysqldump.lock NAGIOS_LOG=$MY_BACKUP_DIR/.nagios-status # Exclude list @@ -43,9 +43,6 @@ if [ ! -f $LOCKFILE ] ; then fi for db in $( /bin/ls -1 /var/lib/mysql/ | grep -v $EXCLUDE_LIST ) ; do if [ -d /var/lib/mysql/$db ] ; then - if [ -f $MY_BACKUP_DIR/$db.sql ] ; then - mv -f $MY_BACKUP_DIR/$db.sql $MY_BACKUP_DIR/history - fi #mysqldump -uroot -f --opt -p$MYSQLPASS $db > $MY_BACKUP_DIR/$db.sql 2> $MY_BACKUP_DIR/log/$db.log mysqldump -f --opt $db > $MY_BACKUP_DIR/history/${db}.sql.${SAVE_TIME} 2> $MY_BACKUP_LOG_DIR/$db.log DUMP_RESULT=$?