Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

E-Mail notification -

Status
Not open for further replies.

DFM

Technical User
Oct 30, 2001
30
US
Hi Folks,
I'm a telecom person who is anewbie to storage management. Our storage people suggested using Tivoli for backing up some Win2K servers used for telecom apps. Everything is OK except we would like e-mail notification upon a succesful, or non sucessful backup. The people responsible for Tivoli have never done this and won't spend the time to look into it.

Could one of you fine people give me some pointers or steer me in the direction of where I might find implementation notes?

Thanks in advance
 
DFM,

Someone may have more info, but I grabbed this from adsm.org. I don't have access to TSM anymore as my current employer uses NetBackup, but this may be of help to you. This will report the number of successfuly and failed backups.
Code:
select count(*) as "Successful Backups" from summary where current_date-date(start_time)='1' and activity='BACKUP' and successful='YES'

select count(*) as "Failed Backups" from summary where current_date-date(start_time)='1' and activity='BACKUP' and successful='NO'

I found this which may help as well:

Code:
/* Create Report of total MBs per each session */

select entity as "Node Name      ", cast(bytes/1024/1024 as decimal(10,3))
as "Total MB  ",  cast(substr(cast(end_time-start_time as char(17)),3,8) as
char(8)) as "Elapsed  ", substr(cast(start_time as  char(26)),1,19) as
"Date/Time              ", case when cast((end_time-start_time) seconds as
decimal) >0 then  cast(bytes/cast((end_time-start_time) seconds as
decimal)/1024/1024 as decimal(6,3)) else cast(0 as decimal(6,3)) end as  "
MB/Sec" from summary where start_time>=current_timestamp - 1 day and
activity='BACKUP'

/* Create Report of total MBs and length of backup for each node */

select entity as "Node Name      ", cast(sum(bytes/1024/1024) as
decimal(10,3)) as "Total MB",  substr(cast(min(start_time) as
char(26)),1,19) as "Date/Time           ",
cast(substr(cast(max(end_time)-min(start_time)  as char(20)),3,8) as
char(8)) as "Length   " from summary where start_time>=current_timestamp -
22 hours and  activity='BACKUP' group by entity

/* Create Report of total backed up*/

select sum(cast(bytes/1024/1024/1024 as decimal(6,3))) "Total GB Backup"
from summary where start_time>=current_timestamp  - 1 day and
activity='BACKUP'

/* Create Report of Storage Pool Copies */

select entity as "Storage Pool                                           ",
cast(bytes/1024/1024 as decimal(10,3)) as "    Total MB ", ' ' as " ",
substr(cast(start_time as char(26)),1,19) as "Date/Time             ",
cast(substr(cast(end_time-start_time as char(20)),3,8) as char(8)) as
"Length   " from summary where  start_time>=current_timestamp - 22 hours and
activity='STGPOOL BACKUP' order by 3, entity

/* Create Summary Report for each Storage Pool */

select entity as "Storage Pool                                           ",
cast(sum(bytes/1024/1024) as decimal(10,3))  as "   Total MB ", ' ' as " ",
substr(cast(min(start_time) as char(26)),1,19) as "Start Date/Time       ",
substr(cast(max(end_time) as char(26)),1,19) as "End Date/Time         "
from summary where start_time>=current_timestamp  - 22 hours and
activity='STGPOOL BACKUP' group by entity

/* Create Report of Total Storage Pool GB copied */

select sum(cast(bytes/1024/1024/1024 as decimal(6,3))) "Total STG Pool GB
Backup" from summary where  start_time>=current_timestamp - 1 day and
activity='STGPOOL BACKUP'


/* Create a report of File Spaces that have been backed up in the last 7
days but missed */
/* being backed up in the last 22 hours. */

select node_name as "Node Name", filespace_name as "File Space Name",
filespace_type as "File Space Type", substr(cast(backup_start as
char(26)),1,16) as "Last Backup Begin", substr(cast(backup_end as
char(26)),1,16) as "Last Backup End" from filespaces where backup_start
>current_timestamp - 7 days and backup_end < current_timestamp - 22 hours
and node_name not in (select node_name from nodes where domain_name in
('DOMAIN_TO_EXCLUDE') or upper(contact) in ('*SUSPENDED*', '*RETIRED*') or
upper(contact) like '%*NO AUDIT*%') order by 3,4,1,2

This was found at adsm.org as well. You should be able to find what you need there.

Hope that helps.

John
 
this might be a little easier:

simply run 'q event * * begindate=today-1 enddate=today endtime=00:00:00 exceptionsonly=no'

This will give you the results of all of your scheduled backups between 00:00:00 yesterday and 00:00:00 this morning.

the results can be output to a file and mailed..
 
how would you go about mailing this log or output to an email address after a command has run? Is there a built in feature on TSM to do this?
 
I think you need to write a shell script that runs the commands against the TSM server and save the output to a log file. You then mail the log file to whomever you want

In your script, you can set group variable containing recipients of the log file. For example,

group="user1@emailadress.com.com user2@emailadress.com.com"

Of course you don’t have to use a group, if only one recipient. Then line below will send the mail

mail -s "what ever text you want here $date" $group < $log file name
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top