Use this command for the following tasks:
Before you perform any of these operations, you should be familiar with the procedures as they are described in the Administrator's Guide.
The restore operation uses database backups created with the BACKUP DB command or created automatically based on the settings specified in the DEFINE DBBACKUPTRIGGER command. You cannot use the DSMSERV RESTORE DB command to load a dump created with the DSMSERV DUMP DB command.
Notes:
Attention: If the log mode is set to roll-forward after a point-in-time database restoration, a database backup starts when the server is brought up for the first time. This can cause loss of data: a tape can have current data on it, but because of the point-in-time restoration, it can be marked as scratch. When the server starts for the first time, TSM may use this tape to write the database backup, thus destroying the original data on this tape.
This situation could occur if roll-forward mode is enabled, but the administrator restored the database as if the server was operating in normal mode, not roll-forward mode. For example: the database is to be backed up at midnight everyday Monday through Friday. On Friday, the database was restored to a point-in-time of midnight Wednesday. Thursday's database backup was not used; this tape exists and does contain valid data. But because the database was restored to Wednesday at midnight, the Thursday's tape was marked as scratch. This tape was then inadvertently chosen and written with the database backup information. Therefore, the data for Thursday was lost.
You can restore a database to its most current state (roll-forward recovery) only if the following are true:
TSM requests volume mounts to load the most recent backup series and then uses the recovery log to update the database to its most current state.
Snapshot database backups cannot be used to restore a database to its most current state.
Syntax
.-Preview--=--No------. >>-DSMSERV RESTORE DB----+---------------------+--------------->< '-Preview--=--+-No--+-' '-Yes-'
Parameters
Examples
Task
Restore the TSM database to its most current state. The recovery log is available and intact.
Sample JCL:
//ADSMSRV0 JOB , // REGION=40M,TIME=1440,CLASS=A,MSGCLASS=H //ADSMSRV0 EXEC PGM=ANRSERV,DYNAMNBR=300,TIME=NOLIMIT, // PARM='/RESTORE DB' //STEPLIB DD DSN=EDC.V2R1M0.SEDCLINK,DISP=SHR // DD DSN=PLI.MINI.SIBMLINK,DISP=SHR // DD DSN=SYS1.LINKLIB,DISP=SHR // DD DSN=ADSM.LINKLIB,DISP=SHR //OPT DD DSN=ADSM.OPTIONS,DISP=SHR,FREE=CLOSE //DSMAMENG DD DSN=ADSM.ANRMSG(ANRMENU),DISP=SHR //HLPAMENG DD DSN=ADSM.ANRHLP(ANRHENU),DISP=SHR //DSK DD DSN=ADSM.DISKLOG,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSTERM DD SYSOUT=*
You can restore a single database volume to its most current state (roll-forward recovery) only if the following are true:
TSM requests volume mounts to load the most recent backup series and then uses the recovery log to update the volume to its most current state.
When TSM restores a mirrored database volume, only one copy of the volume is restored. Use the VARY command to bring the mirrored volume online. TSM then synchronizes the mirrored volume with the restored volume.
Snapshot database backups cannot be used to restore a database to its most current state.
Syntax
>>-DSMSERV RESTORE DB-------------------------------------------> .-Preview--=--No------. >-----DBVol--=--volume_name--+---------------------+----------->< '-Preview--=--+-No--+-' '-Yes-'
Parameters
Examples
Task
Restore database volume ADSMSRV0.DB01 to its most current state. The recovery log is available and intact.
Sample JCL
//ADSMSRV0 JOB , // REGION=40M,TIME=1440,CLASS=A,MSGCLASS=H //ADSMSRV0 EXEC PGM=ANRSERV,DYNAMNBR=300,TIME=NOLIMIT, // PARM='/RESTORE DB DBV=ADSMSRV0.DB01' //STEPLIB DD DSN=EDC.V2R1M0.SEDCLINK,DISP=SHR // DD DSN=PLI.MINI.SIBMLINK,DISP=SHR // DD DSN=SYS1.LINKLIB,DISP=SHR // DD DSN=ADSM.LINKLIB,DISP=SHR //OPT DD DSN=ADSM.OPTIONS,DISP=SHR,FREE=CLOSE //DSMAMENG DD DSN=ADSM.ANRMSG(ANRMENU),DISP=SHR //HLPAMENG DD DSN=ADSM.ANRHLP(ANRHENU),DISP=SHR //DSK DD DSN=ADSM.DISKLOG,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSTERM DD SYSOUT=*
If a volume history file is available, you can restore a database to a point in time. A device configuration file must also be available, or you must manually create one (see Administrator's Guide).
If the volume history file is not available, use the method described in Restoring a Database to a Point in Time -- History File Unavailable.
Full and incremental database backups or snapshot database backups can be used to restore a database to a point-in-time.
Syntax
>>-DSMSERV RESTORE DB----TODate--=--date----+-------------+-----> '-TOTime=time-' .-Source--=--DBBackup-------. .-Preview--=--No------. >-----+---------------------------+---+---------------------+-->< '-Source--=--+-DBBackup---+-' '-Preview--=--+-No--+-' '-DBSnapshot-' '-Yes-'
Parameters
For example, if you issue the DSMSERV RESTORE DB command at 9:00 with TOTIME=NOW, TSM restores the database using the last backup series created on or prior to 9:00 on the specified date.
For example, if you issue the DSMSERV RESTORE DB command at 9:00 with TOTIME=NOW-3:30 or TOTIME+-3:30, TSM restores the database using the last backup series created on or prior to 5:30 on the specified date.
Examples
Task
Restore the database to its state on May 12, 1999 at 2:25 pm. The volume history file is available.
Sample JCL:
//ADSMSRV0 JOB , // REGION=40M,TIME=1440,CLASS=A,MSGCLASS=H //ADSMSRV0 EXEC PGM=ANRSERV,DYNAMNBR=300,TIME=NOLIMIT, // PARM='/RESTORE DB TODATE=05/12/1999 TOTIME=14:25:08' //STEPLIB DD DSN=EDC.V2R1M0.SEDCLINK,DISP=SHR // DD DSN=PLI.MINI.SIBMLINK,DISP=SHR // DD DSN=SYS1.LINKLIB,DISP=SHR // DD DSN=ADSM.LINKLIB,DISP=SHR //OPT DD DSN=ADSM.OPTIONS,DISP=SHR,FREE=CLOSE //DSMAMENG DD DSN=ADSM.ANRMSG(ANRMENU),DISP=SHR //HLPAMENG DD DSN=ADSM.ANRHLP(ANRHENU),DISP=SHR //DSK DD DSN=ADSM.DISKLOG,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSTERM DD SYSOUT=*
If the volume history file is unavailable, you can use one or more DSMSERV RESTORE DB commands to restore the database to a specific point in time. For example, to load a full backup and one or more incremental backups, issue a DSMSERV RESTORE DB command for the full backup and an additional DSMSERV RESTORE DB command for each incremental backup. When you use multiple DSMSERV RESTORE DB commands, specify COMMIT=NO for each command except the last one. For the last command, specify COMMIT=YES. The database remains in an inconsistent and unusable state until you issue a DSMSERV RESTORE DB command with a COMMIT=YES.
Full and incremental database backups or snapshot database backups can be used to restore a database to a point-in-time.
To restore the database using snapshot backup volumes, you must:
Notes:
Syntax
>>-DSMSERV RESTORE DB----DEVclass--=--device_class_name---------> .-,-------------. V | >-----VOLumenames--=--+----volume_name---+-+--------------------> '-FILE:file_name-----' .-COMMIT--=--No------. >-----+--------------------+----------------------------------->< '-COMMIT--=--+-No--+-' '-Yes-'
Parameters
Examples
Task 1
Restore the database to the time of its most recent incremental backup. The volume history file is not available. Tape volumes FULL1, FULL2, INCR1, and INCR2 contain the database backup series.
Sample JCL:
//SERVER EXEC PGM=DSMSERV, // PARM='/RESTORE DB DEV=CARTRIDGE VOL=FILE:DD:TAPES' //OPT DD DSN=ADSM.ANRSERV.OPTIONS,DISP=SHR //DSMAMENG DD DSN=ADSM.ANRMSG(ANRMENU),DISP=SHR //HLPAMENG DD DSN=ADSM.ANRHLP(ANRHENU),DISP=SHR //DSK DD DSN=ADSM.DISKLOG,DISP=SHR //SYSPRINT DD SYSOUT=H //SYSTERM DD SYSOUT=H //TAPES DD * TAPE01 TAPE02 TAPE03 TAPE04 /*
Task 2
Restore a database to the time of its most recent snapshot backup. The volume history file is not available. Tape volumes TAPE01 and TAPE02 are snapshot volume names in a volume sequence that spans two tapes.