Meditations, Musings and Memorial Stones

AVANIM :: TecHarmony :: Backing up MySQL

Backing up MySQL

April 15, 2006 | Comments: 0

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.

Post a comment


(required, but not displayed)

(optional)


(required)