Difference between revisions of "Talk:MySQL - dumping and restoring"

From WPKG | Open Source Software Deployment and Distribution
Jump to: navigation, search
(Different method proposed)
(No difference)

Revision as of 21:13, 7 April 2009

Wouldn't it be easier to do this in a for loop instead? Something like this:

for i in $(echo 'SHOW DATABASES;' | mysql -u<username> -p<password> | grep -v '^Database$'); do mysqldump --<some-options-for-mysqldump> $i > db-backup_$i.sql done

-- Tor (tor@tblab.net)