Email notification from Exchange Flashcopy?

ttrinh7974

ADSM.ORG Member
Joined
Apr 21, 2004
Messages
8
Reaction score
0
Points
0
Website
Visit site
Here's the script to run daily backup, how do I incorporate the daily email notification send from this script?
I can kick off a manual email after the backup is complete but not sure how to incorporate it to send it daily.



****

pushd .
cd /d "D:\Program Files\Tivoli\TSM\TDPExchange"
set rc=0
tdpexcc query tdp 2>&1
if %errorlevel% neq 0 set rc=%errorlevel%
tdpexcc query tsm 2>&1
if %errorlevel% neq 0 set rc=%errorlevel%
tdpexcc query exchange 2>&1
if %errorlevel% neq 0 set rc=%errorlevel%
tdpexcc backup * incr /EXCLUDEDAGACTIVE /tsmoptfile=dsm.opt /SKIPINTEGRITYCHECK
rem tdpexcc backup * 2>&1
rem if %errorlevel% neq 0 set rc=%errorlevel%
popd
exit %rc%
 

Attachments

  • script.jpg
    203 KB · Views: 1
  • email.jpg
    315.7 KB · Views: 1
Something like:

if %errorlevel% neq 0 set rc=%errorlevel%
tdpexcc backup * incr /EXCLUDEDAGACTIVE /tsmoptfile=dsm.opt /SKIPINTEGRITYCHECK
rem tdpexcc backup * 2>&1
rem if %errorlevel% neq 0 set rc=%errorlevel%
popd

if %rc% eq 0 (
bmail -s <server_name> -t [email protected] -f [email protected] -a "Backup is successful"
) else (
bmail -s <server_name> -t [email protected] -f [email protected] -a "Backup failed"
)

exit %rc%

Of course, you need to have bmail installed:

http://retired.beyondlogic.org/solutions/cmdlinemail/cmdlinemail.htm
 
Moon-buddy,

Here's what I tried and got

(Error)
D:\Program Files\Tivoli\TSM\TDPExchange>rem tdpexcc backup * 2>&1
D:\Program Files\Tivoli\TSM\TDPExchange>rem if 0 neq 0 set rc=0
D:\Program Files\Tivoli\TSM\TDPExchange>if 0 eq 0 (bmail -s mail.xxxx.org -t ttrinh@xxxxx -f ttrinh@xxxxx -a "Backup is successful") else (bmail -s mail.xxxx.org -t ttrinh@xxxxx -f ttrinh@xxxxx -a "Backup failed")

(Error)
D:\Program Files\Tivoli\TSM\TDPExchange>rem tdpexcc backup * 2>&1
D:\Program Files\Tivoli\TSM\TDPExchange>rem if 0 neq 0 set rc=0
D:\Program Files\Tivoli\TSM\TDPExchange>if 0 eq 0 (c:\temp\bmail.exe -s bmail -s mail.xxxx.org -t ttrinh@xxxxx -f ttrinh@xxxxx -a "Backup is successful") else (bmail -s mail.xxxx.org -t ttrinh@xxxxx -f ttrinh@xxxxx -a "Backup failed")

(Error)
D:\Program Files\Tivoli\TSM\TDPExchange>rem tdpexcc backup * 2>&1
D:\Program Files\Tivoli\TSM\TDPExchange>rem if 0 neq 0 set rc=0
D:\Program Files\Tivoli\TSM\TDPExchange>if 0 eq 0 (mail -s mail.xxxx.org -t ttrinh@xxxxx -f ttrinh@xxxxx -a "Backup is successful") else (bmail -s mail.xxxx.org -t ttrinh@xxxxx -f ttrinh@xxxxx -a "Backup failed")
 
Moon-buddy,

I grab the bmail and here's my latest result. Still no mail
 

Attachments

  • script.txt
    612 bytes · Views: 1
  • Error_255.jpg
    223.2 KB · Views: 0
  • backup_result.txt
    8.2 KB · Views: 0
Is Port 25 (SMTP) open on the reporting server? Does the reporting server have a path to the e-mail server?

Even if you are running this on the Exchange server, I believe bmail needs to get out and get back in for e-mail to succeed.

Have you just tried running something like this from the command line? Is the bmail path defined globally?

bmail -s <mail_server_name> -t [email protected] -f [email protected] -a "Backup failed"
 
Back
Top