If you want to schedule a task on windows to backup and move your data somewhere, the lack of documentation and command-line tools in windows can make it a real beast. I hope this helps you keep your data safe.
First off, you will need a command line file compressor (or your should use one, anyway). I like GNU gzip. You can get it for windows here
http://gnuwin32.sourceforge.net/packages/gzip.htm
Secondly, you will need to use windowsw FTP via command line. It took me all day to find documentation on this guy, so I hope this saves some time for somebody.
Anyway, you need two files -- the batch file and a script for your ftp client. The Batch file should look like this guy (it uses random numbers in the file name so that multiple backups are not overwritten):
@ECHO OFF
@REM Set dir variables. Use ~1 format in win2k
SET basedir=C:\BACKUP~1
SET workdir=c:\TEMP
SET mysqldir=c:\mysql\bin
SET gzipdir=c:\PROGRA~1\GnuWin32\bin
SET mysqlpassword=mygoodpassword
SET mysqluser=myrootuser
@REM Change to mysqldir
CD %mysqldir%
@REM dump database. This is all one line
mysqldump -u %mysqluser% -p%mysqlpassword% --all-databases >%workdir%\backup.sql
@REM Change to workdir
CD %workdir%
@REM Zip up database
%gzipdir%\gzip.exe backup.sql
@REM Move to random file name
MOVE backup.sql.gz backup.%random%.gz
@REM FTP file to repository
FTP -n -s:%basedir%\ftp-commands.txt
@REM Remove old backup files
del backup.sql
del backup.*.gz
@REM Change back to base dir
CD %basedir%
And your ftp script should look like this guy (and be named ftp-commands.txt so the above script can find it)
open
ftp.mybackuplocation.com
user
myusername
mypassword
bin
put backup.*.gz
quit
Make sure both of the above files are in whatever directory you set up as %basedir% and test it out and make sure everything works for you. Then schedule it to run every day to protect your data!