AV-Looks
Watching and Wondering

Backing up MySQL

Posted by Andrew Sat, 15 Apr 2006 05:30:00 GMT

Back in the day of MyISAM, restoring a MySQL database was as simple as copying files from your backup. No more is this the case with InnoDB. Therefore it is imperative that a good backup strategy includes doing MySQL dumps, comme ca:
# Dump Mysql DBs before backups
user=admin
pass=adminpass
destdir=/var/lib/mysql_dumps

ls -1 /var/lib/mysql | while read db;
do
 /bin/nice -n 19 mysqldump -u admin --password=$pass $db > $destdir/$db.sql;
done 

This is script is incorporated into AVLUX daily backups.

Posted in ,  | Tags , , , ,  | no comments | no trackbacks

Comments

Trackbacks

Use the following link to trackback from your own site:
http://avlooks.net/articles/trackback/31

(leave url/email »)

   Comment Markup Help Preview comment