DRM implementation

tmaria

ADSM.ORG Member
Joined
Apr 29, 2004
Messages
28
Reaction score
0
Points
0
PREDATAR Control23

Hello,

we have implemented the DRM module, on our TSM server (ver 6.2.0 on centos machine) . However I have the following questions:
1. do we need to ensure that no backup/archive sessions are running, before running DRM maintenance script? If yes, how can I esnure that all my clients backups have finished?. Please note that DR script, is running on schedule basis, with no user intervation
2. I would like also to make some queries to drmedia - which tapes should be moved offsite, which tapes to retrieve from vault,etc - and then the output from these queries, I would like to email it.It would be nice also to be used by our syslog server.
3. Has anyone install the Nagios plugin, for TSM.? any comments?

Thank you
Maria
 
PREDATAR Control23

1. Not sure. I assume it is a TSM maintenance script. To be sure no smooth running of your script, explain how it is called (TSM or OS) and post your DRM maintenance script for a once over.

2. Checkout 'select * drmedia' then you can build any sql script you wish. If you make it an OS script then you can move things around and email them.

3. I have not.
 
PREDATAR Control23

Hello,

we have implemented the DRM module, on our TSM server (ver 6.2.0 on centos machine) . However I have the following questions:
1. do we need to ensure that no backup/archive sessions are running, before running DRM maintenance script? If yes, how can I esnure that all my clients backups have finished?. Please note that DR script, is running on schedule basis, with no user intervention

In my case, I make sure that all backups/archives are done before 0700H, all copy to offsite tapes done by 0945H, and DB FULL backup done by 1100H. After which, all DRM scripts are ran.
2. I would like also to make some queries to drmedia - which tapes should be moved offsite, which tapes to retrieve from vault,etc - and then the output from these queries, I would like to email it.It would be nice also to be used by our syslog server.

Easy, use q drm AFTER you generate a FULL DB backup BUT before you ran the DR Plan. Note the tapes that are mountable which are the tapes destined for OFFSITE and WHICH tapes are of status Vault Retrieve. I like to run scripts out of TSM (UNIX, Linux or DOS) to send an e-mail to my Operations team the list of tapes that will be sent OFFSITE and to be RETRIEVED.
3. Has anyone install the Nagios plugin, for TSM.? any comments?

No I have not, either.
 
Last edited:
PREDATAR Control23

You can use a TSM script to check the sessions and depending on if any are accessing backup the storage pools.

/* Backup storage pools if clients are not accessing the server */
select * from sessions
/* There are no sessions if rc_notfound is received */
if(rc_notfound) backup stg backuppool copypool

Look here for more detail.
 
PREDATAR Control23

Hello moon-buddy


ok. This is the question. How you make sure that all backup/archives are done before 0700H?? and all other jobs also? through a script, through session checkup?

Easy, use q drm AFTER you generate a FULL DB backup BUT before you ran the DR Plan. Note the tapes that are mountable which are the tapes destined for OFFSITE and WHICH tapes are of status Vault Retrieve. I like to run scripts out of TSM (UNIX, Linux or DOS) to send an e-mail to my Operations team the list of tapes that will be sent OFFSITE and to be RETRIEVED.

Can you please sent a post with such a script? I would like to avoid to sent the password through plain OS script. Is there any other way to do that? through a redirection of output from the tsm, , write the output of the tsm script to a plain text file, and email that file?
 
PREDATAR Control23

Hello moon-buddy
ok. This is the question. How you make sure that all backup/archives are done before 0700H?? and all other jobs also? through a script, through session checkup?

You know your environment: make sure that you schedule backups such that it finishes within the backup window. Increase the number of sessions as much as possible BUT make sure that you have enough disk storage to hold the data. Create storage pools as needed.

This is a trial and error scheme and you are the only one that can really do this as the TSM Admin. This is one skill that you should master.

Can you please sent a post with such a script? I would like to avoid to sent the password through plain OS script. Is there any other way to do that? through a redirection of output from the tsm, , write the output of the tsm script to a plain text file, and email that file?


I will give one script for the mountable tapes; you have to do the one for vault retrieve:

#!/bin/ksh

COMD="dsmadmc -id=user -pass=password -noconfirm -dataonly=yes"
[email protected]
DATE=`date '+%b-%d-%Y'`

LIST=`$COMD "q drm"|grep "Mountable"|awk '{print $1}'`

for i in $LIST
do
echo $i >> $DATE-tape-mountable.csv
done

cat $DATE-tape-mountable.csv|mailx -s "List of tapes for pickup" -r [email protected] $MAIL

sleep 10

$COMD "move drm * wherestate=mountable remove=bulk tostate=vault"
 
Last edited:
PREDATAR Control23

I have a somewhat related question.
I have scripts ready like the one Moon buddy showed. But I am not sure how i can automate them. I cannot use cron and am trying to use TSM to schedule the jobs.
 
PREDATAR Control23

Look into administrator schedules.

Help define schedule
 
PREDATAR Control23

Hi Raakin, thanks for the reply.
I am trying to define a server script using contents of another file and then use the admin schedules --- but its erroring out with invalid command #

/*!/bin/ksh */
/*----------------------------------------------------------------------------*/
/* This script changes the offsite DR tapes from Vault retrieve to courier retrieve */
/* It also produces the list of tapes coming back from Offsite vault.*/
/*----------------------------------------------------------------------------- */
cmd1="move drm * wherest=vaultr wait=yes"
dsmadmc -id=tsm1 -pa=**** "$cmd1" > /**/**/log/step1
cmd="q drm * wherestate=courierr"
dsmadmc -id=rpatel1 -pa=citgo "$cmd" > /**/**/log/tapes_to_be_returned_from_offsite
mail -s'LEMTSM01 - Tapes to be returned from offsite' *****.com < /**/**/log/tapes_to_be_returned_from_offsite
/*
/* end of script */


I want these commands to send me emails at the end and so i am trying to use a scipt
 
PREDATAR Control23

Since you are passing the commands within TSM you do not need to call dsmadmc, just pass the commands.

Code:
move drm * wherest=vaultr wait=yes
q drm * wherestate=courierr > 'list the path of the file to output it'
I have not used TSM emailing capabilities (I use other software to fill that need); You may need some extra steps or additional software. In the example I listed I was outputting the list to a file on the TSM server and then you could create a script to pick that up and email it. If someone else is familiar on how to email directly from TSM, hopefully the will list it.

Also, someone will ask (like me right now) why can't you use cron?
 
PREDATAR Control23

I use cron and AIX's mailing to let people know of which tapes are tsm db backups and such. It is easy and problem free. (this is me recommending it).
 
Top