DB2 Backup Using TSM
DB2 Backup Using TSM
DB2 Backup Using TSM
http://user-techdocs.blogspot.in/2009/04/db2-backup-using-tsm.html
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
1 of 3
5/26/2013 3:38 AM
http://user-techdocs.blogspot.in/2009/04/db2-backup-using-tsm.html
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 =
2 of 3
5/26/2013 3:38 AM
http://user-techdocs.blogspot.in/2009/04/db2-backup-using-tsm.html
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 = DB2ITM Local database alias = CDW
3 of 3
5/26/2013 3:38 AM