File: D:/bin/webbackup/Copy of webbackup.cmd
rem SS, 24/3/06 version for 1and1 server
res SS, 10/10/08 version for new 1and1 server
d:
cd d:\bin\backup
del d:\backups\webbak.zip
wzzip d:\backups\webbak.zip d:\web\*.* -rp -whs -ex -smaxis5
rem --- mysql backup
del d:\backups\mysql_backup.zip
rem --- use mysql dump command to do dump all the databases
mysqldump --opt --user=root --password=oscaris10 --all-databases >d:\backups\mysql_backup.sql
rem --- zip it up
wzzip d:\backups\mysql_backup.zip d:\backups\mysql_backup.sql -whs -ex -smaxis5
rem --- delete file which is now in zip
del d:\backups\mysql_backup.sql
rem --- secure data backup, added 26/4/06, SS
del d:\backups\securedata.zip
wzzip d:\backups\securedata.zip d:\data\*.* -rp -whs -ex -smaxis5oscaris10blahblah#~#~$*![(])blah456
rem --- IIS log backup
rem del d:\backups\iislogbak.zip
rem wzzip d:\backups\iislogbak.zip c:\windows\system32\logfiles\*.* -rp -whs -ex
rem --- DNS backup
del d:\backups\dnsbak.zip
wzzip d:\backups\dnsbak.zip c:\windows\system32\dns\*.* -ex
rem --- IIS Configuration backup (last saved)
del d:\backups\iiscfgbak.zip
wzzip d:\backups\iiscfgbak.zip C:\windows\system32\inetsrv\*.* -rp -whs -ex
rem --- delete backup of 14 days ago (only keep past 14 days)
cmddate -14 del d:\backups\#.zip>op.bat
call op.bat
rem --- add all to one file with today's date .zip
cmddate 0 wzzip d:\backups\#.zip @ziplist.txt>op.bat
call op.bat
rem === START OF FTP ====
rem --- build the FTP operations file
echo bak3418515>ftpop.txt
echo 3wwVvzVd>>ftpop.txt
echo binary>>ftpop.txt
rem following deletes backup file from 14 days ago
cmddate -14 delete #.zip>>ftpop.txt
rem following uploads todays backup file
cmddate 0 put d:\backups\#.zip>>ftpop.txt
echo quit>>ftpop.txt
rem --- FTP the file to other server
ftp -s:ftpop.txt backup339.onlinehome-server.info>>ftplog.txt
rem --- build the FTP operations file
rem (SS,10/10/08) had to use open due to non standard port used
echo open ftp.ontheworldweb.com 5821>ftpop.txt
echo backup>>ftpop2.txt
echo oscaris10>>ftpop2.txt
echo binary>>ftpop2.txt
rem following deletes backup file from 21 days ago
cmddate -21 delete #.zip>>ftpop2.txt
rem following uploads todays backup file
cmddate 0 put d:\backups\#.zip>>ftpop2.txt
echo quit>>ftpop2.txt
rem --- FTP the file to ontheworldweb server
ftp -s:ftpop2.txt>>ftplog2.txt
rem --- delete the FTPed file
cmddate 0 del d:\backups\#.zip>op.bat
call op.bat
rem === END OF FTP ====
rem --- Zip up full NTBackup file which starts at 10:00pm, and is later FTPed to SS PC
rem del d:\backups\webserverbackup.zip
rem wzzip d:\backups\webserverbackup.zip d:\backups\webserverbackup.bkf -ex