• Please help support our sponsors by considering their products and services.
    Our sponsors enable us to serve you with this high-speed Internet connection and fast webservers you are currently using at ADSM.ORG.
    They support this free flow of information and knowledge exchange service at no cost to you.

    Please welcome our latest sponsor Tectrade . We can show our appreciation by learning more about Tectrade Solutions
  • Community Tip: Please Give Thanks to Those Sharing Their Knowledge.

    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.

  • Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)

    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

DRM implementation

tmaria

ADSM.ORG Member
#1
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
 

Raakin

ADSM.ORG Senior Member
#2
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.
 

moon-buddy

ADSM.ORG Moderator
#3
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:

chad_small

ADSM.ORG Moderator
#4
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.
 

tmaria

ADSM.ORG Member
#5
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?
 

moon-buddy

ADSM.ORG Moderator
#6
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:

rulan

ADSM.ORG Member
#7
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.
 

rulan

ADSM.ORG Member
#9
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
 

Raakin

ADSM.ORG Senior Member
#10
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?
 

umur

ADSM.ORG Senior Member
#11
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).
 

Advertise at ADSM.ORG

If you are reading this, so are your potential customer. Advertise at ADSM.ORG right now.

UpCloud high performance VPS at $5/month

Get started with $25 in credits on Cloud Servers. You must use link below to receive the credit. Use the promo to get upto 5 month of FREE Linux VPS.

The Spectrum Protect TLA (Three-Letter Acronym): ISP or something else?

  • Every product needs a TLA, Let's call it ISP (IBM Spectrum Protect).

    Votes: 10 16.7%
  • Keep using TSM for Spectrum Protect.

    Votes: 35 58.3%
  • Let's be formal and just say Spectrum Protect

    Votes: 9 15.0%
  • Other (please comement)

    Votes: 6 10.0%

Forum statistics

Threads
31,185
Messages
132,720
Members
21,341
Latest member
sskkss
Top