[Lias] MySQL backup

Les Bell lesbell at lesbell.com.au
Thu Jul 17 08:28:01 UTC 2003


Tom Doyle <tom at stvincents.nsw.edu.au> wrote:

>>
What can I schedule MySQL database backups with?
<<

How about a cron job in the middle of the night that does:

mysqldump -p<password> --opt <database> | gzip -c - > <filename>.gz

? You can restore it with

zcat <filename>.gz | mysql -C <database> -p<password>

Nice and simple, and can be easily turned into a script that maintains
multiple revisions of backups, etc.

Best,

--- Les Bell, RHCE, CISSP
[http://www.lesbell.com.au]





More information about the lias mailing list