hidden:TSM backup

From Lsdf

1. TSM backup of HPSS mover

2. TSM backup of HPSS core

on either core server in crontab:
#HPSS file systems backups only from the active core server
00 02 * * * if [ $(hostname) == "hpsscr" ] ; then /opt/tivoli/tsm/client/ba/bin/dsmc inc -se="hpsscr_backup" 2>&1 ; /root/tsm/hpss_ba_tbspaces_tree.sh >> /root/tsm/hpsscr/dsm_hpss.out  2>&1 ; fi
#system backup
00 07 * * * /opt/tivoli/tsm/client/ba/bin/dsmc inc -se="system_backup" >> /root/tsm/hpsscr02/dsm_hpsscr02.out 2>&1
System backup:
TSM backup for the local file systems: / /localhome /boot (TSM does not make a backup for mounted file systems, they have to be specified)
TSM server defined in dsm.sys: system_backup
TSM node names: scc-hpsscr01, scc-hpsscr02
Active core backup:
TSM backup for all HPSS file systems; it runs only on active core
TSM node name: scc-hpsscr
TSM server defined in dsm.sys: hpsscr_backup

TSM backup of DB2 tablespaces directory structure

The following script takes a tsm backup of DB2 tablespaces directory structure. (DB2 backup makes data backup here is only the directory structure)
It may be helpful for restoring DB2 from a DB2 bgackup.
It is an IBM recommendation to backup the directory structure, it was not required for our restore test Database Restore exercised on Test Core
[root@hpsscr02 lost+found]# cat /root/tsm/hpss_ba_tbspaces_tree.sh
#! /bin/bash
for i in $(seq 1 24); do
/opt/tivoli/tsm/client/ba/bin/dsmc inc -se="hpsscr_backup" -dirsonly /hpss_tbspc$i
done

TSM config file on either core server

cat /opt/tivoli/tsm/client/ba/bin/dsm.sys 
servername      system_backup
  nodename        scc-hpsscr01
  domain / /localhome /boot
  tcpport                 1503
  tcpserveraddress        scc-tsm-sb03.scc.kit.edu
  commmethod              tcpip
  passwordaccess          generate
*inclexcl                /usr/local/tsm/backup.inclexcl
  schedlogretention       32 d
  errorlogretention       32 d
  resourceutilization     1
servername      hpsscr_backup
  nodename        scc-hpsscr
  domain /varhpss /hpss_src /db2_backup1 /db2_backup2 /db2_logarchived1 /db2_logarchived2 /optdb2 /varhpssdb
  tcpport                 1503
  tcpserveraddress        scc-tsm-sb03.scc.kit.edu
  commmethod              tcpip
  passwordaccess          generate
*inclexcl                /usr/local/tsm/backup.inclexcl
  schedlogretention       32 d
  errorlogretention       32 d
  resourceutilization     1

TSM useful

List backup file systems made by TSM
dsmc q fi -se=hpsscr_backup
List all active backup files in a directory
dsmc q ba /db2_backup1/hghi/ -se=hpsscr_backup
List all backup files in a directory (active and inactive)
dsmc q ba -ina /db2_backup1/hghi/ -se=hpsscr_backup
Restore a file with its original path in another directory
dsmc restore /db2_backup1/hghi/HGHI.0.hpssdb.DBPART000.20160705040006.001 /tmp/ -se=hpsscr_backup
Restore a file without its original path in another directory
dsmc restore /db2_backup1/hghi/HGHI.0.hpssdb.DBPART000.20160705040006.001 /tmp/ -se=hpsscr_backup -preservepath=nobase
Restore a file in its original location
dsmc restore /db2_backup1/hghi/HGHI.0.hpssdb.DBPART000.20160705040006.001 -se=hpsscr_backup
NOTE
For more complicated restores read TSM BAUser'sGuide or ask SCC-TSM-Team