Here is an old email response to a simular request that Ken Cornetet supplied some time ago. I guess you could change it to your needs. Enjoy!
Use the GUI to create the backup selection file "everything.bks". Obviously, you want this file to include your Exchange information stores. Change the "BNCHMARK DLT1 SCSI Sequential Device" to whatever the name of your tape drive is. See Q267574. This batch file needs grep, recode, and blat. Use your favorite search engine. rem ***************************************************************** rem * rem * Perform fullback to whatever tape is in the drive and email rem * report rem * rem * Ken Cornetet - 06/10/2002 rem * rem * Revision History rem * rem * When Who What rem * --------------------------------------------------------------- rem * 06/10/2002 Ken Cornetet Original Issue rem * 06/24/2002 Ken Cornetet Added RSM command per Q267574 rem * rem ***************************************************************** set [EMAIL PROTECTED] set SMTP=ntserver1 set NAME=FULL BACKUP %DATE% %TIME% rem this is where NTBackup writes it's (unicode - blech) logs set LOGS=%USERPROFILE%\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data c: cd \backup rem Delete any extranious log files del "%LOGS%\backup*.log" rem ************************************************************ rem * Have removable storage management look at tape in drive rem * (See Q267574 for details) rem ************************************************************ start /wait rsm refresh /lf"BNCHMARK DLT1 SCSI Sequential Device" c:\bin\sleep 30 rem ************************************************************ rem * Do Backup rem ************************************************************ start /wait ntbackup backup @c:\backup\everything.bks /M normal /J "%NAME%" /P DLT /N "%NAME%" /l:s /HC:on /UM /D "%NAME%" rem ************************************************************ rem * find newest (should be only) log file rem ************************************************************ dir /s /b /o-d "%LOGS%\backup*.log" >c:\backup\backup.tmp set /P FILE= <c:\backup\backup.tmp rem ************************************************************ rem * Make ASCII version of log file rem ************************************************************ c:\bin\recode -f unicode..us <"%FILE%" >log.txt rem ************************************************************ rem * Append list of open files to the report rem ************************************************************ echo **************** OPEN FILES ************************ >>log.txt net file >>log.txt rem ************************************************************ rem * Set subject for email rem ************************************************************ set SUBJ=Backup ran OK grep -v "Error: You do not have permission" > log1.txt findstr /i error: log1.txt if not ERRORLEVEL 1 set SUBJ=Backup ran - FAILED rem ************************************************************ rem * Send email rem ************************************************************ c:\bin\blat log.txt -t %RECIPIENT% -subject "%SUBJ%" -server %SMTP% -f %RECIPIENT% rem ************************************************************ rem * Move log file to our directory rem ************************************************************ move /Y "%FILE%" c:\backup -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -=-=-=-=-= -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Candee Vaglica Sent: Tuesday, October 21, 2003 11:36 AM To: Exchange Discussions As long as ntbackup is creating the log file, you can use blat to send it. -----Original Message----- From: Eric Holtzclaw [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2003 11:29 AM To: Exchange Discussions Subject: Ntbackup scripts Does anyone have a script/bat file that emails the Ntbackup log files on a daily bases? Eric _________________________________________________________________ List posting FAQ: http://www.swinc.com/resource/exch_faq.htm Web Interface: http://intm-dl.sparklist.com/cgi-bin/lyris.pl?enter=exchange&text_mode=&lang =english To unsubscribe: mailto:[EMAIL PROTECTED] Exchange List admin: [EMAIL PROTECTED] _________________________________________________________________ List posting FAQ: http://www.swinc.com/resource/exch_faq.htm Web Interface: http://intm-dl.sparklist.com/cgi-bin/lyris.pl?enter=exchange&text_mode=&lang =english To unsubscribe: mailto:[EMAIL PROTECTED] Exchange List admin: [EMAIL PROTECTED] _________________________________________________________________ List posting FAQ: http://www.swinc.com/resource/exch_faq.htm Web Interface: http://intm-dl.sparklist.com/cgi-bin/lyris.pl?enter=exchange&text_mode=&lang=english To unsubscribe: mailto:[EMAIL PROTECTED] Exchange List admin: [EMAIL PROTECTED]