From: Ken Y. C. <kc...@cs...> - 2004-03-16 21:28:41
|
On Tue, Mar 16, 2004 at 03:07:02PM -0500, Charles Hauser wrote: > All, > > I'm interested in writing a cron job to backup mysql that will: > - Backup all the global information first (users and groups, typically) > - Backup each database independantly (not dumpall) You'll probably want to use MySQL's own "mysqldump" to do this. There are lots of options you can use, but, at its simplest, you can use it to just dump plain text INSERT statements. E.g., to dump the "foo" database: $ mysqldump -uroot -pXXXXX foo > foo.sql The "mysql" database contains all the users, permissions, etc. I've never restored this database from a backup, so you might investigate if dumping via "mysqldump" is really the best way to go for backing that up. HTH, ky |