Hi All,

I want to publish the backup script i use to backup sharepoint every night. It is a very basic BATCH script (.bat) which uses STSADM sharepoint command line tool to backup sharepoint then uses winrar to zip and compress the file in date format then copy to the destination drive. 

# setting a the variable stsadm as the location of the command line tool
set stsadm="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN\stsadm.exe"
# set the variable %todaysdate% as todays date
set %todaysdate%=%date:~7,2%_%date:~4,2%_%date:~10,4%
# make a directory for today's sharepoint backup
mkdir E:\Backups\Sharepoint\File\%todaysdate%
# we are using the STSADM tool to make a full sharepoint backup
%stsadm% -o backup -directory E:\Backups\Sharepoint\File\%todaysdate% -backupmethod full
# this is zipping up the sharepoint backup as SharepointBackupXX_XX_XX.rar from contents of E:\backups\sharepoint\file\
"c:\program files\winrar\winrar.exe" a -u -r -m5 "E:\Backups\Sharepoint\Zip\SharepointBackup%date:~7,2%_%date:~4,2%_%date:~10,4%.rar" "E:\Backups\Sharepoint\File\%todaysdate%\*.*"
# this is copying the contents of "ZIP" to the destination backup drive which is mapped as S:\
 xcopy "E:\Backups\Sharepoint\Zip" "S:\Sharepoint\" /Y /E

Any comments or suggestions are welcome.