[vox-tech] Tar, MySQL, and cron-ed backups

David Hummel vox-tech@lists.lugod.org
Fri, 5 Dec 2003 12:46:23 -0800


On Fri, Dec 05, 2003 at 12:33:22PM -0800, Bill Kendrick wrote:
> 
> On Fri, Dec 05, 2003 at 12:24:59PM -0800, David Siedband wrote:
> > Why not just export the the databases with MySQL-dump and back up the 
> > exported files instead of the live databases?
> 
> I'm vaguely familiar with what he's working on (though hadn't looked into
> backups there), and unfortunately, I think disk space is an issue ATM.

The SQL file produced by mysqldump will be smaller than the actual
database directory.  This directory contains index files and table
definition files that really don't need to be backup up.

IMO, the best solution is:

  mysqldump --opt mydb | gzip > mydb_`date +%y%m%d%H%M%S`.sql.gz


David Hummel
Genomics & Gene Discovery
WRRC/ARS/USDA