Robert Martin describes transformations as similar to refactorings but not behaviour preserving.
Transformations
Reply
Robert Martin describes transformations as similar to refactorings but not behaviour preserving.
Give permissions for every database to the backup user (you might not need lock tables).
GRANT SELECT, LOCK TABLES ON *.* TO backupuser@host IDENTIFIED BY 'password'; |
dbUser= dbHost= dbPass= for db in $(mysql --user=$dbUser --host=$dbHost \ --password=$dbPass -Bse 'show databases') do backupFile=sql/$db.$(date +%F)-$(date +"%T").sql.gz mysqldump --add-drop-database --user=$dbUser \ --host=$dbHost --password=$dbPass \ $db | gzip -9 > $backupFile done |