TSM

From dbawiki
Revision as of 13:00, 8 August 2014 by Stuart (talk | contribs) (Retrieve file from TSM)
Jump to: navigation, search

Tivoli Storage Management

Default location for files

Linux, AIX
dsm.sys,dsm.opt               /opt/tivoli/tsm/client/ba/bin
dsmerror.log, dsmsched.log    /opt/tivoli/tsm/client/ba/bin

Solaris
dsm.sys,dsm.opt               /usr/tivoli/tsm/client/ba/bin
dsmerror.log, dsmsched.log    /var/log

Starting the TSM client

On Unix

dsmc -se=so_u_`hostname`_orx_d_bax

On Windows

dsmc -optfile=c:\oracle\SID\admin\dsm.opt

Send a file to TSM

dsmc archive -server=SO_U_ubenoa31_ORX_D_BAX "/oracle/export/NSWORKP1/export_NSWORKP1_D_FULL_201301030007_01.dmp"

Query the archive to see if a file is available in TSM

dsmc query archive -server=SO_U_ubenoa31_ORX_D_BAX "/oracle/export/NSWORKP1/export_NSWORKP1_D_FULL_20130103*"

Query all the files sent to the monthly node since start of FEB 2013 (displaying dates in YYYY-MM-DD format)

dsmc q ar -date=3 -fromdate=2013-02-01 -subdir=yes -se=SO_U_`uname -n`_ORX_M_BAX "/oracle/export/*"

List all export jobs on this TSM node

cd /oracle/export
dsmc q ar -subdir=yes -se=SO_U_UBENOA26_ORX_D_BAX "expdp*"

Retrieve file from TSM

dsmc retrieve -pick -server=SO_U_ubenoa31_ORX_D_BAX "/oracle/export/NSWORKP1/export_NSWORKP1_D_FULL_20130103*"

This opens an interactive window listing all files that match the file query (note the wildcard)
Files can be toggled on and off for recovery by pressing the number associated with the file then recover with the letter o (for ok!).
If several versions of the same file exist, use the description field to make the distinction

dsmc retr -server=SO_U_`hostname`_ORX_D_SOL -descr="*30-01-2014*" "/oracle/export/AGP/export_AGP_D_FULL_20130103*"

Retrieve a file from TSM and save it to a different name

dsmc retr -server=SO_U_`hostname`_ORX_D_SOL /oracle/export/AGP/export_AGP_D_FULL_201301031200.dmp renamedfile.dmp

Show details about all management classes on the TSM server

dsmc query mgmtclass -detail

Force a management class

In the DSM.opt file, use the include options to specify a management class.
When you archive files, you can override the assigned management class by using the archmc option.

dsmc archive -archmc=D01MAC_M14 "/oracle/export/NSWORKP1/export_NSWORKP1_D_FULL_201301030007_01.dmp"

Restart LANFree Storage agent

udevdba31:root[/home/root]# ps -ef|grep dsmsta
    root 13828246        1   0   Mar 26      - 512:39 /usr/tivoli/tsm/StorageAgent/bin/dsmsta
    root 29491300 62259284   0 11:58:29  pts/1  0:00 grep dsmsta
udevdba31:root[/home/root]# kill 13828246
udevdba31:root[/home/root]# ps -ef|grep dsmsta
    root 41418862 62259284   0 11:58:48  pts/1  0:00 grep dsmsta
udevdba31:root[/home/root]# cat /etc/inittab | grep stg
autostgagnt:2:off:/usr/tivoli/tsm/StorageAgent/bin/rc.tsmstgagnt
udevdba31:root[/home/root]# at now
/usr/tivoli/tsm/StorageAgent/bin/rc.tsmstgagnt<CTRL-D>
Job root.1366365724.a will be run at Fri Apr 19 12:02:04 DFT 2013.
udevdba31:root[/home/root]# ps -ef|grep dsmsta
    root 20906202 62259284   0 12:02:28  pts/1  0:00 grep dsmsta
    root 64225302  3735904   0 12:02:16      -  0:01 dsmsta quiet
udevdba31:root[/home/root]#

Update number of mount points for a node

tsm: TSMSRV1>upd node CLUBDEV maxnummp=4
ANR2063I Node CLUBDEV updated.

Clean up export dump and log files if they are on tape

for i in `find /oracle/export -name "*dmp" -type f`; do
    sid=`echo $i | awk -F_ '{print $2}'`
    echo dsmc q ar -se=so_u_`hostname`_orx_d_bax $i 
    dsmc q ar -se=so_u_`hostname`_orx_d_bax $i >/tmp/results.$$
    if grep $i /tmp/results.$$; then
            echo rm -f $i
                 rm -f $i
    fi
done
rm /tmp/results.$$