Basic Batch Script Backup MySQL Tables To Separate Files

This is a very crude example of how to use a windows batch script to backup each table within a mysql database to an individual sql file in a folder.

FOR /F %%G IN ('"echo show tables | mysql -s -u user -ppassword mydatabase"')  DO mysqldump -s -u user --password=password mydatabase %%G > t:\mysqlbackup\tables\%%G.sql


Post a Comment

Popular posts from this blog

ActiveMQ, easy to use open source message oriented middleware (MOM)

Basic Send Message to MQ with Java and IBM MQ JMS

MySQL Error Invalid Table or Database Name