Membership Membership:
Latest New User Latest: vpros
Past 24 Hours Past 24 Hours: 0
Prev. 24 Hours Prev. 24 Hours: 0
User Count Overall: 137

People Online People Online:
Visitors Visitors: 6
Members Members: 0
Total Total: 6

NakedMCSE Computer Tech Support Forums

So you have passed all of the exams and you are now out in the real world of windows servers, linux servers and freebsd servers faced with a tech support problem you have never seen before...

Find free online tech support in the forums below, respecting that advice is free, but work beyond advice is not...

The General forum is provided for off topic discussion.

You need a user account to post - please Register or Login.

Online Tech Support Forums
  Forum  Open Source Tec...  MySQL Server  MySQL Linux | Unix Backup Script
Previous Previous
Next Next
New Post 9/21/2009 3:09 PM
119 posts
10th Level Poster

MySQL Linux | Unix Backup Script 
Modified By Walker  on 9/24/2009 4:25:46 PM)

 This is a script I use on my linux/unix boxes to backup MySQL.  It creates a backup for every day of the month and stores the backups on the first of each month:

# MySQL Backup Script
# 2nd - 31st FULL OVERWRITE
DATE_DAY=`date +%d`
DATE_MONTH=`date +%b`

if [ "$DATE_DAY" == "01" ]
  $MYSQLDUMP -u root -pyourrootpassword --all-databases > /backup/archive/mysql-$DATE_MONTH.sql
  $GZIP -f /backup/archive/mysql-$DATE_MONTH.sql
  $MYSQLDUMP -u root -pyourrootpassword --all-databases > /backup/mysql-$DATE_DAY.sql
  $GZIP -f /backup/mysql-$DATE_DAY.sql

Adjust the paths, switches and variable names as necessary.

Lairds Computer Services

Previous Previous
Next Next
  Forum  Open Source Tec...  MySQL Server  MySQL Linux | Unix Backup Script
Send me One Million FREE Guaranteed Visitors