Backup mysql database

cpopham

Well-known member
Joined
Feb 18, 2004
Messages
273
I am trying to figure out what would be the best way to back up mysql through vb.net. I was thinking of using mysql dump, but do not know how I could use that through vb .net.

Does anyone have any ideas? I want to backup all of the databases located on the mySql server into a single file and then this file can be moved or copied or whatever?

Thanks, Chester
 
From the mySQL manual....
BACKUP TABLE tbl_name[,tbl_name...] TO /path/to/backup/directory

Copies to the backup directory the minimum number of table files needed to restore the table, after flushing any buffered changes to disk. Currently works only for MyISAM tables. For MyISAM tables, copies `.frm (definition) and `.MYD (data) files. The index file can be rebuilt from those two.

Before using this command, please see section 4.4.1 Database Backups.

So, I guess you need to loop through all tables in all databases and backup each table and then zip it up to a single file.

HTH
/Kejpa
 
Back
Top