User Tools

Site Tools


tsm:restoredb_7

This is an old revision of the document!


Steps to restore a DB on TSM 7

1. Prevent TSM server from any action: Stop TSM, change your add the following lines to dsmserv.opt, and restart TSM

NOMIGRRECL
DISABLESCHED YES
EXPINT 0

2. Do a backup of the TSM Database

3. backup volhist and devconfig in TSM

4. Stop the TSM server

5. Remove the DB if still exists

dsmserv removedb TSMDB1

6. Prepare the DB to load:

Syntax

>>-DSMSERV -+----------------------+---------------------------->
            |  (1)                 |   
            '------- -u--user_name-'   
                                 (2).- -k--Server1--.   
>--+-------------------------+------+---------------+----------->
   |  (1)                    |      '- -k--key_name-'   
   '------- -i--instance_dir-'                          
>--+-------------------+--+------------+--+---------+----------->
   '- -o--options_file-'  '- -noexpire-'  '- -quiet-'   
                           .-,---------.     
                           V           |     
>--LOADFORMAT--+-DBDir--=----directory-+-+---------------------->
               '-DBFile--=--file---------'   
   .-ACTIVELOGSize--=--16384-----.   
>--+-----------------------------+------------------------------>
   '-ACTIVELOGSize--=--megabytes-'   
>--ACTIVELOGDirectory--=--directory----------------------------->
>--ARCHLogdirectory--=--directory------------------------------->
>--+----------------------------------------+------------------->
   '-ARCHFailoverlogdirectory--=--directory-'   
>--+----------------------------------+------------------------><
   '-MIRRorlogdirectory--=--directory-'  

Example as instance user

# db2set -i tsminst1 DB2CODEPAGE=819
# db2start
# dsmserv loadformat dbdir=/tsm/tsminstd2db activelogdir=/tsm/tsmd2actlog activelogsize=16384 archlogdir=/tsm/tsmd2archlog

3. Restore the DB:

 # dsmserv restore db     (latest backup)

If it failed with Rollforward, then you have to specify a date and time (check into volhistory)

 # dsmserv restore db todate=MM/DD/YYYY totime=hh:mm:ss

Syntax

>>-DSMSERV -+----------------------+---------------------------->
            |  (1)                 |   
            '------- -u--user_name-'   

                                 (2).- -k--Server1--.   
>--+-------------------------+------+---------------+----------->
   |  (1)                    |      '- -k--key_name-'   
   '------- -i--instance_dir-'                          

>--+-------------------+--+---------------+--RESTORE DB--------->
   '- -o--options_file-'  |  (1)          |               
                          '------- -quiet-'               

                    .-TOTime--=--23:59:59-.   
>--TODate--=--date--+---------------------+--------------------->
                    '-TOTime--=--time-----'   
                    
   .-Source--=--DBBackup-------.   
>--+---------------------------+-------------------------------->
   '-Source--=--+-DBBackup---+-'   
                '-DBSnapshot-'     

>--+---------------------------+-------------------------------->
   '-RECOVerydir--=--directory-'   

>--+----------------------------+------------------------------->
   '-ACTIVELOGDir--=--directory-'   

                                     .-PReview--=--No------.   
>--+------------------------------+--+---------------------+---->
   '-ON--=--target_directory_file-'  '-PReview--=--+-Yes-+-'   
                                                   '-No--'     

   .-RESTOREKeys--=--No-------.   
>--+--------------------------+--------------------------------->
   '-RESTOREKeys--=--+-No---+-'   
                     +-YES--+     
                     '-ONLY-'     

>--+----------------------------+------------------------------><
   '-PASSword--=--password_name-'   
tsm/restoredb_7.1609532731.txt.gz · Last modified: 2021/01/01 21:25 by 127.0.0.1