Wednesday, January 16, 2008

Tivoli TSM

# lslpp -l tivoli* <-- To check TSM version and installed fileset on MC TSM client
Path: /usr/lib/objrepos
tivoli.tivguid 1.1.0.0 COMMITTED IBM Tivoli GUID on AIX
tivoli.tsm.client.api.64bit 5.2.0.0 COMMITTED TSM Client - 64bit API
tivoli.tsm.client.ba.64bit.base 5.2.0.0 COMMITTED TSM Client - Backup/Archive Base
tivoli.tsm.client.ba.64bit.common 5.2.0.0 COMMITTED TSM Client-Backup/ArchiveCommon
tivoli.tsm.client.ba.64bit.web 5.2.0.0 COMMITTED TSM Client - Backup/Archive WEB
tivoli.tsm.tdpr3.ora.64bit 3.3.2.0 COMMITTED Data Protection for SAP
Path: /etc/objrepos
tivoli.tivguid 1.1.0.0 COMMITTED IBM Tivoli GUID on AIX


TSM Backup/Archive Client Config Files
* v3.x systems: /usr/lpp/adsm/bin/dsm.sys and /usr/lpp/adsm/bin/dsm.opt
* v4 system: /usr/tivoli/tsm/client/ba/bin/dsm.sys & dsm.sys

TSM Scheduler logs
· Directory: /local/etc/tsm/schedule_log
· schedlogname: /var/adm/dsmsched.log <---- EU installation
· errorlogname: /var/adm/dsmerror_log <----EU installation
· inclexcl: /usr/tivoli/tsm/client/ba/bin/inclexcl (AIX)
· inclexcl: /opt/tivoli/tsm/client/ba/bin/inclexcl (Solaris)
· dsm.sys: /usr/tivoli/tsm/client/ba/bin/dsm.sys <--Backup param
· dsm.opt: /usr/tivoli/tsm/client/ba/bin/dsm.opt

/local/etc/tsm/bin/dsm.opt <---specify client processing options


dsm.sys
· dsm.sys - Used to specify one/more servers to contact for services, and communications options for each server. This file can also include authorization options, backup and archive processing options, and scheduling options.
· Example
$more /usr/tivoli/tsm/client/ba/bin/dsm.sys
/local/etc/tsm/bin/dsm.sys <---which refer to schedule_log and inclexcl
* dsm.sys file V 1.0 01/05/2001
Servername ICB0008_TSM
TCPPort 1500
TCPServeraddress icb0008
TCPWindowsize 640
TCPBuffsize 512
TXNBytelimit 2097152
schedmode prompted
schedlogretention 5
schedlogname /local/etc/tsm/schedule_log
inclexcl /local/etc/tsm/inclexcl/inclexcl
tcpnodelay YES
passwordaccess generate
SCHEDLOGRetention 7
schedlogname /var/adm/dsmsched.log
errorlogname /var/adm/dsmerror_log
inclexcl /usr/tivoli/tsm/client/ba/bin/inclexcl (AIX)
inclexcl /opt/tivoli/tsm/client/ba/bin/inclexcl (Sol)

dsm.opt
· dsm.opt / inclexcl – – used to specify client processing options, including the TSM server to use for filesystem backups.
· Example: /usr/tivoli/tsm/client/ba/bin/dsm.opt
/local/etc/tsm/bin/dsm.opt
...
SERVERNAME icb0008_TSM
tapeprompt no
subdir yes

inclexcl
· to include/exclude a specific file or groups of files from backup services, and to assign specific management classes to files. Tivoli Storage Manager backs up any file that is not explicitly excluded. Because Tivoli Storage Manager processes your include-exclude list from the bottom of the list up, it is important to enter all your include-exclude statements in the proper order. You can use the query inclexcl command to display a list of include and exclude statements in the order they are examined
· /local/etc/tsm/inclexcl/inclexcl
By default, all data is backed up to the default management class. The inclexcl file can be used to:
1.Exclude files from backup.
2.Backup files to a different management class
· Example:
root@icb0044 # dsmc q inclexcl
*** FILE INCLUDE/EXCLUDE ***
Mode Function Pattern (match from top down) Source File
---- --------- ------------------------------ -----------------
--snip--
Excl All /usr/sap/???/.../data/ROLLFL?? /local/etc/tsm/inclexcl/inclexcl
Excl All /usr/sap/???/.../data/PAGFIL?? /local/etc/tsm/inclexcl/inclexcl
Excl All /usr/sap/tmp/.../* /local/etc/tsm/inclexcl/inclexcl
Incl All /usr/sap/trans/.../* /local/etc/tsm/inclexcl/inclexcl
Incl All /usr/sap/.../* /local/etc/tsm/inclexcl/inclexcl
Incl All /oracle/???/????log?/.../cntrl???.dbf /local/etc/tsm/inclexcl/inclexcl
Incl All /oracle/???/sapdata*/.../cntrl???.dbf /local/etc/tsm/inclexcl/inclexcl
Excl All /oracle/stage/.../* /local/etc/tsm/inclexcl/inclexcl
Excl All /oracle/???/mirrlog?/.../* /local/etc/tsm/inclexcl/inclexcl
Excl All /oracle/???/origlog?/.../* /local/etc/tsm/inclexcl/inclexcl
Excl All /oracle/???/sapdata*/.../* /local/etc/tsm/inclexcl/inclexcl
Excl All /oracle/???/saparch/*.dbf /local/etc/tsm/inclexcl/inclexcl
Incl All /sapmnt/???/???JOBLG/.../* /local/etc/tsm/inclexcl/inclexcl
Incl All /local/backup/sap/logs/* /local/etc/tsm/inclexcl/inclexcl
Excl All /unix /local/etc/tsm/inclexcl/inclexcl

TSM Scheduler logs (/local/etc/tsm/schedule_log)

· The client scheduler logs are located in /local/etc/tsm/schedule_log* or in the file specified in the schedulogname parameter in the dsm.sys file.
· The scheduler log contains the messages from all events scheduled from the TSM Server, which is generally the filesystem backups.
· For MegaCentre, the scheduler logs are rotated daily to reduce the size of the file that is appended to during filesystems backups. The scheduler log only contains information about scheduled backups. It does NOT contain information about dsmc commands entered interactively (e.g. dsmc incr). The file should be examined when working on filesystem backup failures.
11/23/03 04:18:10 ANS1312E Server media mount not possible
11/23/03 04:18:10 Retry # 2 Normal File--> --snip-- ** Unsuccessful **
11/23/03 04:18:12 --- SCHEDULEREC STATUS BEGIN
11/23/03 04:18:12 Total number of objects inspected: 70,058
11/23/03 04:18:12 Total number of objects backed up: 212
11/23/03 04:18:12 Total number of objects updated: 0
11/23/03 04:18:12 Total number of objects rebound: 6,421
11/23/03 04:18:12 Total number of objects deleted: 0
11/23/03 04:18:12 Total number of objects expired: 51
11/23/03 04:18:12 Total number of objects failed: 5
11/23/03 04:18:12 Total number of bytes transferred: 111.96 MB
11/23/03 04:18:12 Data transfer time: 85.86 sec
11/23/03 04:18:12 Network data transfer rate: 1,335.24 KB/sec
11/23/03 04:18:12 Aggregate data transfer rate: 107.61 KB/sec
11/23/03 04:18:12 Objects compressed by: 0%
11/23/03 04:18:12 Elapsed processing time: 00:17:45
11/23/03 04:18:12 --- SCHEDULEREC STATUS END
11/23/03 04:18:12 ANS1312E Server media mount not possible
11/23/03 04:18:12 --- SCHEDULEREC OBJECT END FS_BACKUP_1 11/23/03 04:00:00
11/23/03 04:18:12 ANS1512E Scheduled event 'FS_BACKUP_1' failed. Return code = 12.
11/23/03 04:18:12 Sending results for scheduled event 'FS_BACKUP_1'.
11/23/03 04:18:12 Results sent to server for scheduled event 'FS_BACKUP_1'.


TSM Inactive Files
· Uique feature of TSM when performing regular filesystem backups: active vs. inactive files.
· TSM considers the most recent backup version to be the active version. The most recent backup version is considered an inactive version if the file was deleted or excluded at the time the last incremental backup was run. Any other backup version is considered an inactive version.
· When performing restores, you must specify inactive to restore any inactive files. By default, all TSM restore and query commands assume the files are active.
· Command Line: #dsmc –ina active ...
· WEB/GUI: View ---> Select “active and inactive files”


TSM Backup/Archive Client
Sample dsmc restore/retrieve Commands
Command Remark
# dsmc restore /tmp/file.to.restore Restore the active version of an individual file to its original location
# dsmc restore -pick –ina \ /oracle/DC0/saparch/archDC0.log Use the pick option to select a particular version of an inactive file to restore
# dsmc restore “filename*” restore the latest backup version of a filename with a wildcard character
# dsmc restore filename newfilename restore the latest backup version of a file back to a renamed file or different location
# dsmc restore -ina –pick -replace=prompt - \ subdir=yes directory/ newdirectory/ restore an inactive version of a directory with a pickllist and rename (directories must end in a /)
#dsmc restore -subdir=yes -pitdate=MM/DD/YYYY \ - pittime=15:00 directory/ restore an directory to a particular point in time (directories must end in a /)
NOTEIf you need to restore a file that was backed up with the “archive” function, you would use the “dsmc retrieve” command. It has similar options to the “dsmc restore” command.
#dsmc archive directory/ -subdir=yes - \ archmc=db_online_1 -desc="save before restore“ archive a directory (e.g. before a restore)
#dsmc help Access dsmc help menus

Sample dsmc backup/query Commands


# dsmc incr <---incremental backup of the entire system
# dsmc incr /local/logs/brreports/scripts/<---incr. backup of one dir( end with /)
# dsmc selective /local/logs/brreports/scripts/ selective (full) backup of one directory (directories must end in a /)
# dsmc q fi query filesystems to see last successful backup
# dsmc q sched query to see when next scheduled backup runs
#dsmc q backup -ina \ /local/backup/image/bos.obj.icb0006 #dsmc q backup -ina \ “/local/backup*/image*/bos.obj.icb0006” query to see all versions of a backed up fileUse “ “ if there is a wild card entry in the files that we want to query.
# dsmc q inclexcl query to display the files included/excluded

NOTE
can also archive files with the dsmc archive command.
Archives are retention based instead of version based.to be added.


Example
====================================================================
1. 06:00 17th August Time- Restore of files from the oldest available until 31 Dec 2004
tsm> restore -inactive subdir=yes -todate=12/31/2004 -fromowner=cdusr02 "/local/data/archive/*" /restore_temp/

2. 06:00 18th August Time- Restore of files from 31st Dec 2004 until 30th June 2005
tsm> restore -inactive subdir=yes -fromdate=12/31/2004 -todate=06/30/2005 -fromowner=cdusr02 "/local/data/archive/*" /restore_temp/

3. 06:00 19th August Time- Restore of files from 30th June 2005 until 1st Jan 2006
tsm> restore -inactive subdir=yes -fromdate=06/30/2005 -todate=01/01/2006 -fromowner=cdusr02 "/local/data/archive/*" /restore_temp/
====================================================================
The destination (/restore_temp/) is created in such a way;
as it was found out from testing that TSM will create only 1 parent directory from the asterisk (*) specified in the source (/local/data/archive/*) parameter.


check for backup file (date format mm/dd/yyyy)
#dsmc query backup "/local/pbridge/data/acq_file_20" -fromdate=08/14/2005 -todate=08/14/2005 -inactive

restore file acq_file_20 with new name acq_file_20_aug14 at directory /local/pbridge/data/

#dsmc restore -fromdate=08/14/2005 -todate=08/14/2005 -inactive "/local/pbridge/data/acq_file_20" /local/pbridge/data/acq_file_20_aug14




TSM Central Scheduler
for scheduling TSM Administrative commands and for all Filesystem backups.
What can be scheduled :
• Client commands (Backup / restore)
• Administrative commands.

Sample Filesystem Backup Schedule

tsm: ICB0008_TSM>q sched
Domain * Schedule Name Action Start Date/Time Duration Period Day
------------ - ---------------- ------ -------------------- -------- ------ ---
DOM_SAP FS_BACKUP_1 Inc Bk 08/28/01 04:00:00 4 H 1 D Any
DOM_UNIX FS_BACKUP_1 Inc Bk 09/27/01 22:30:00 2 H 1 D Any

tsm: ICB0008_TSM>q assoc
Policy Domain Name: DOM_SAP
Schedule Name: FS_BACKUP_1
Associated Nodes: ICB0001 ICB0003 ICB0004 ICB0006 ICB0008 ICB0009 ICB0010 ICB0011 ICB0015 ICB0016 ICB0017 ICB0018 ICB0030 ICB0031 ICB0032 ICB0033 ICB0034 ICB0035 ICB0036 ICB0037 ICB0038 ICB0039 ICB0040 ICB0041 ICB0042 ICB0043 ICB0044 ICB0045 ICB0046 ICB0118 ICB0119

Policy Domain Name: DOM_UNIX
Schedule Name: FS_BACKUP_1
Associated Nodes: HOUICBUX1003 HOUICBUX1004 HOUICBUX1005 HOUICBUX1006 HOUICBUX1007 HOUICBUX1008 HOUICBUX1009 HOUICBUX1010 HOUICBUX1011 HOUICBUX1012 HOUICBUX1014 HOUICBUX1015 HOUICBUX1016


Support problems
“dsmc sched” not running
Restart scheduler either via host specific method (check boot method) or /local/backup/sap/tsm/scripts/TSMclient_Start
Verify that scheduler is active: ps -aef|grep sched


Correcting Filesystem Backup Failures
#su - root
#ps –ef | grep sched <--check tsm scheduler
#dsmc q fe
#dsmc q fi
#dsmc q se <--- no password prompt, then continue. ELSE please correct it
#dsmc q se
ok>



TSM Retention Periods
As per requirement of an individual clients/ default standard for the org.

TSM Client Daemon Start
AIX:Usually in /local/etc/scripts/rc.local
For example:
nohup /usr/tivoli/tsm/client/ba/bin/dsmc sched -password=`hostname` 1> /dev/null 2>&1 &
(or it may execute the TSMclient_Start script)

Solaris:
/etc/rc3.d/S30tivoli
nohup dsmc sched -optfile=dsm.opt2 1> /dev/null 2>&1 &

No comments: