You've shown yours, now I'll show mine... (Needs grep, recode, and blat)
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% 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 [EMAIL PROTECTED] copy log.txt \\ntserver1\default rem ************************************************************ rem * Move log file to our directory rem ************************************************************ move /Y "%FILE%" c:\backup -----Original Message----- From: Tony McCarthy [mailto:[EMAIL PROTECTED]] Sent: Sunday, August 25, 2002 11:17 PM To: Exchange Discussions Subject: RE: W2K Backup Thanks to everyone for the useful feedback re W2K Backups for Exchange. I've finally managed to get my backups running automatically. I've created a batch file (see below) that works quite efficiently. This is heavily plagiarized from various sources so my apologies to anyone I haven't acknowledged here. You just need to replace the names for the .bks and tape drive (i.e. " c:\backups\daily.bks" and "ARCHIVE Python 06408-XXX SCSI Sequential Device") and it'll work. I've tried it on 2 different servers with different tape drives and it does the job nicely. Regards Tony ---------------------------------------------------------------------------- rsm.exe refresh /lf"ARCHIVE Python 06408-XXX SCSI Sequential Device" sleep 10 for /f "Tokens=1-4 Delims=/ " %%i in ('date /t') do set dt=%%i-%%j-%%k-%%l for /f "Tokens=1" %%i in ('time /t') do set tm=-%%i set tm=%tm::=-% set dtt=%dt%%tm% ntbackup.exe backup "@c:\backups\daily.bks" /n "Daily Backup %dtt%" /d "Daily Backup %dtt%" /v:yes /r:no /rs:no /hc:on /m normal /j "%dtt%" /l:f /UM /p "4mm DDS" rsm.exe eject /pf"Daily Backup %dtt% - 1" /astart ---------------------------------------------------------------------------- Known bug - http://support.microsoft.com/default.aspx?scid=kb;en-us;Q267574 Anyway the trick is to run rsm and have it inventory your drive before running ntbackup. Another little gotcha - the log file produced by ntbackup is unicode. If you plan on having a script peek at the log file, this might trip you up. -----Original Message----- From: Tony McCarthy [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 22, 2002 4:48 PM To: Exchange Discussions Subject: RE: W2K Backup The main problem I'm having is with the scheduling of the backups. I know this is a well documented problem but the MS fixes aren't too hot. I'm currently working on a backup script that will get around the numerous bugs but have had problems in this area; i.e. even with a script I'm finding that the backup sometimes fails because the server thinks there's "no unused media of the appropriate type" even though there's a tape in the drive. The other concern I have is that you can't restore individual mailboxes with W2K Backup. I'm not too worried about enterprise-level software because many of the offices are connected via slow links so a backup for each individual server is required at each location. Do you just backup the Info Store and Directory William or do you backup the whole Exchsrvr directory as well (or alternatively). I'm not sure which is the best option. Regards Tony W2K's NTBackup does backup Exchange5.5 reliably. Restores it reliably as well. What problems are you having? If you have lots of servers at different sites, a more enterprise-level backup solution might be better for you. William -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Tony McCarthy Sent: Thursday, August 22, 2002 2:24 PM To: Exchange Discussions Subject: W2K Backup Hi Everyone, I know this topic has been dealt with in the past but I'm trying to find some hard data on why W2K Backup doesn't reliably backup Exchange 5.5. I have been pushing to get Veritas Backup Exec in every office in our organization but am a voice in the wilderness. The powers that be reckon Backup Exec isn't significantly better than W2k Backup as far as Exchange is concerned. It's a cost thing. I know W2K Backup doesn't backup open files but in a worst case scenario (server crashes and burns) what will I lose when trying to restore site and server objects? I mean, I'm not too worried if a few e-mails are lost because they were being edited at the time but if I were to lose whole mailboxes, public folders etc, that's a different story. Basically I've just been backing up the Public Information Stores and Directories of the various servers and hoping for the best. We have yet to suffer an Exchange Server crash at the offices that don't have Veritas. We have Veritas at other offices and it has definitely proved its worth a couple of times when Exchange servers have been nuked. I once had to restore an Exchange 5.0 server with NT 4.0 backup and this went reasonably well. Anyway, I'd appreciate feedback re this. I know how badly W2K Backup sucks for other reasons but how well does it backup Exchange 5.5? Regards Tony _________________________________________________________________ List posting FAQ: http://www.swinc.com/resource/exch_faq.htm Archives: http://www.swynk.com/sitesearch/search.asp To unsubscribe: mailto:[EMAIL PROTECTED] Exchange List admin: [EMAIL PROTECTED] _________________________________________________________________ List posting FAQ: http://www.swinc.com/resource/exch_faq.htm Archives: http://www.swynk.com/sitesearch/search.asp To unsubscribe: mailto:[EMAIL PROTECTED] Exchange List admin: [EMAIL PROTECTED] _________________________________________________________________ List posting FAQ: http://www.swinc.com/resource/exch_faq.htm Archives: http://www.swynk.com/sitesearch/search.asp To unsubscribe: mailto:[EMAIL PROTECTED] Exchange List admin: [EMAIL PROTECTED] _________________________________________________________________ List posting FAQ: http://www.swinc.com/resource/exch_faq.htm Archives: http://www.swynk.com/sitesearch/search.asp To unsubscribe: mailto:[EMAIL PROTECTED] Exchange List admin: [EMAIL PROTECTED] _________________________________________________________________ List posting FAQ: http://www.swinc.com/resource/exch_faq.htm Archives: http://www.swynk.com/sitesearch/search.asp To unsubscribe: mailto:[EMAIL PROTECTED] Exchange List admin: [EMAIL PROTECTED] _________________________________________________________________ List posting FAQ: http://www.swinc.com/resource/exch_faq.htm Archives: http://www.swynk.com/sitesearch/search.asp To unsubscribe: mailto:[EMAIL PROTECTED] Exchange List admin: [EMAIL PROTECTED]