TSM Symposium 2013 - IBM smarter data protection – which backup target should be used
DB2 Backup Using TSM
-
Upload
dens-cant-be-perfect -
Category
Documents
-
view
230 -
download
0
Transcript of DB2 Backup Using TSM
-
7/30/2019 DB2 Backup Using TSM
1/3
Here comes a small guidelines how to set up the db2 backup to use TSM:
Requirements:
- TSM server
- TSM Client
- TSM API client
- DB2 Server
- DB2 Client
Tested system environment, that works me fine:
OS:
RedHat Linux ES 5.1 (Tikanga) 32Bit
DB2
-Tested version: 8.2 FP14
- Instance name: db2itm
-Database name: CDW
TSM
-Tested version: 5.5
-Server name: tsm
-Server binary path:/opt/tivoli/tsm/server/bin
-Client binary path:/opt/tivoli/tsm/client/ba/bin
-API binary path:/opt/tivoli/tsm/api/ba/bin
1. TSM server configuration (if it is not already done)
define domain DB2 description='DB2 backup domain'define policy DB2 standard description='DB2 policy set'define
mgmt DB2 standard DB2mgmt description='DB2 management class'
define copy DB2 standard DB2mgmt standard type=backup destination=BACKUPPOOL
define copy DB2 standard DB2mgmt standard type=archive destination=ARCHIVEPOOL
assign defmgmtclass DB2 standard DB2mgmt
activate policy DB2 standard
register node DB2Node password domain=DB2
2. DB2 tasks:
Add the following lines to the/opt/tivoli/tsm/client/api/bin/dsm.sys:
SErvername DB2
nodename DB2Node
TCPSERVERADDRESS tsm
Passwordaccess PROMPT
run the password generator program:
/home/db2itm/sqllib/adsm/dsmapipw*************************************************************
* Tivoli Storage Manager *
* API Version = 5.5.0 *
*************************************************************
Enter your current password:
Enter your new password:
Enter your new password again:
sudo - db2itm
Create a new directory called tsm under the instance home directory.
mkdir /home/db2itm/tsm
Create a symlink to the /opt/tivoli/tsm/client/api/bin/dsm.sys
ln -s /opt/tivoli/tsm/client/api/bin/dsm.sys /home/db2itm/tsm/dsm.sys
DB2 backup using TSM
backup using TSM http://user-techdocs.blogspot.in/2009/04/db2-backup-using-tsm.html
5/26/2013 3:38 AM
-
7/30/2019 DB2 Backup Using TSM
2/3
Create a new dsm.opt file in /home/db2itm/tsm dir
Add the following line to the file:
SErvername DB2
Add the following lines to the db2profile file
#Identifies the full directory path and file name of the Tivoli Storage Manager user
#options file dsm.opt.
export DSMI_CONFIG=/home/db2itm/tsm/dsm.opt
#Identifies the directory path where dsm.sys located
export DSMI_DIR=/home/db2itm/tsm
#Identifies the directory path where the error log file, dsierror.log,
#is to be #created.
export DSMI_LOG=/home/db2itm/tsm
logout/login
db2stop
db2start
su - db2itm
Update the database cfg using the following commands:
db2 update db cfg for CDW using LOGARCHMETH1 TSM:STANDARD
db2 update db cfg for CDW using TSM_MGMTCLASS DB2mgmt
db2 update db cfg for CDW using TSM_NODENAME DB2Node
db2 update db cfg for CDW using TSM_PASSWORD password
db2 update db cfg for CDW using logretain on
[db2itm@tivoli tsm]$ db2 get db cfg for cdw
First log archive method (LOGARCHMETH1) = TSM:STANDARD
TSM management class (TSM_MGMTCLASS) = DB2MGMT
TSM node name (TSM_NODENAME) = DB2Node
TSM owner (TSM_OWNER) =
TSM password (TSM_PASSWORD) = *****
Log retain for recovery enabled (LOGRETAIN) = RECOVERY
Online backup:
db2 backup db online CDW use tsm
Use the /home/db2itm/sqllib/adsm/db2adutl utility the t
db2adutl delete full keep 5 db CDW without prompting >> /home/db2itm/tsm/CDW.delete.log 2>&1
Restore the database:
db2 restore db CDW use TSM
db2 rollforward db CDW to end of logs and complete
[db2itm@tivoli ~]$ db2 rollforward db CDW to end of logs and complete
Rollforward Status
Input database alias = CDW
Number of nodes have returned status = 1
Node number = 0
Rollforward status = not pending
Next log file to be read =
backup using TSM http://user-techdocs.blogspot.in/2009/04/db2-backup-using-tsm.html
5/26/2013 3:38 AM
-
7/30/2019 DB2 Backup Using TSM
3/3
Log files processed = S0000033.LOG - S0000033.LOG
Last committed transaction = 2009-04-21-19.14.54.000000
DB20000I The ROLLFORWARD command completed successfully.
[db2itm@tivoli ~]$ db2 connect to CDW
Database Connection Information
Database server = DB2/LINUX 8.2.7
SQL authorization ID = DB2ITMLocal database alias = CDW
Posted 17th April 2009 by Zsmboki Attila
Labels: DB2,TSM
backup using TSM http://user-techdocs.blogspot.in/2009/04/db2-backup-using-tsm.html
5/26/2013 3:38 AM