[racktables-users] Re: Windows 2008 IIS & MS SQL

  • From: "Lacayo, Luis F" <lflacayo@xxxxxxxxxxxxx>
  • To: <racktables-users@xxxxxxxxxxxxx>
  • Date: Tue, 23 Mar 2010 10:25:06 -0500

This is the script that I run from Cron and works very well for me..

#!/bin/sh
DIR=/usr/local/mysql-backups/
DATESTAMP=$(date +%Y%m%d)
DB_USER=julio
DB_PASS='iglesias'
# remove backups older than $DAYS_KEEP
DAYS_KEEP=5
find ${DIR}* -mtime +$DAYS_KEEP -exec rm -f {} \; 2> /dev/null
# create backups securely
# umask 006
# list MySQL databases and dump each
DB_LIST=`mysql -u $DB_USER -p"$DB_PASS" -e'show databases;'`
DB_LIST=${DB_LIST##Database}
for DB in $DB_LIST;
do
  FILENAME=${DIR}${DB}-${DATESTAMP}.sql.gz
  mysqldump -u $DB_USER -p"$DB_PASS" --opt --flush-logs $DB | gzip >
$FILENAME
  echo $FILENAME
done


-----Original Message-----
From: racktables-users-bounce@xxxxxxxxxxxxx
[mailto:racktables-users-bounce@xxxxxxxxxxxxx] On Behalf Of Jason
Ledford
Sent: Tuesday, March 23, 2010 8:46 AM
To: racktables-users@xxxxxxxxxxxxx
Subject: [racktables-users] Re: Windows 2008 IIS & MS SQL

Just to add to the pile, this is the best mysql backup script I have
found
http://sourceforge.net/projects/automysqlbackup/ never tried to migrate
it to windows though :(

runs nightly and I have a week's worth of daily's, a month worth of
weekly's, and a year worth of monthly's. 

For server 08 though IIS+PHP would be the way to go http://php.iis.net/
And is very easy to install.





Other related posts: