View Single Post
  #6  
Old 05-05-2005, 07:51 AM
 
sstillwell@aerostich.com sstillwell@aerostich.com is offline
 

eXpert
  
Join Date: Jun 2004
Location: Duluth, MN
Posts: 242
 

Default

I guess I just run a bash script via cron that optimizes my tables and then backs them up.

Code:
#Change the 5 variables below to fit your computer/backup COMPUTER=`/bin/hostname -s` # Name of this computer CREDENTIALS="-u your_username -pyour_password" BACKUPDIR=/backup # Where to store the backups MYSQLDUMP="/usr/bin/mysqldump" MYSQLCHECK="/usr/bin/mysqlcheck" DATABASE="your_database" #You should not have to change anything below here PATH=/usr/local/bin:/usr/bin:/bin DOW=`date +%a` # Day of the week e.g. Mon # Optimizes the database $MYSQLCHECK $CREDENTIALS -o -B $DATABASE # Dumps the mysql db to a file in the backup dir $MYSQLDUMP --opt $CREDENTIALS $DATABASE > $BACKUPDIR/$COMPUTER.$DOW.$DATABASE.sql
__________________
No longer using Xcart, was good while it lasted.
Reply With Quote