Sunday, October 9, 2011

Script for mysql database backup

#!/bin/bash
#Script for mysql database backup
cd /var/lib/mysql
for i in $(ls -d */ |tr -d /)
do

`mysqldump -u root -p"abcdef" $i > /disk2/dbdump-MID/$i.sql`

done

No comments:

Post a Comment