MySQL Forums
Forum List  »  General

MySQL backup breakes a table every time
Posted by: Dimas Streich
Date: March 13, 2014 05:34AM

I've a MySQL Server 5.1.58-1ubuntu1 installed on an Ubuntu 12.04 LTS.

Every night we do a backup of all the databases with this script:

rm -rf /var/backup/mysql/*
for i in $(echo 'SHOW DATABASES;' | mysql -u root -p'password' |grep -v '^Database$'); do
mysqldump \
-u root -p'password' \
-Q -c -C --add-drop-table --add-locks --quick --lock-tables \
$i > /var/backup/mysql/$i.sql;
tar -cpzf /var/backup/mysql/$i.sql.tar.gz /var/backup/mysql/$i.sql;
rm -rf /var/backup/mysql/$i.sql
done;

Every time the backup is executed a particular MySQL table is broken (the MYD and MYI files are deleted, while the FRM remains).

We have many databases and tables, only this one is broken.

Any idea?

Options: ReplyQuote


Subject
Written By
Posted
MySQL backup breakes a table every time
March 13, 2014 05:34AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.