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, it 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:
A device configuration file with the applicable device information (library, drive, and device class definitions) must also be available, or you must manually create one (see Administrator's Guide).
Tivoli Storage Manager 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
Preview the list of volumes required to restore the database to its most current state.
Command:
dsmserv restore db preview=yes
You can restore a single database volume to its most current state (roll-forward recovery) only if the following are true:
A device configuration file with the applicable device information (library, drive, and device class definitions) must also be available, or you must manually create one (see Administrator's Guide).
Tivoli Storage Manager 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 Tivoli Storage Manager restores a mirrored database volume, only one copy of the volume is restored. Use the VARY command to bring the mirrored volume online. The mirrored volume is then synchronized the 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 dbvol2 to its most current state. The recovery log is available and intact.
Command:
dsmserv restore db dbvol=dbvol2
If a volume history file is available, you can restore a database to a point in time. A device configuration file with the applicable device information (library, drive, and device class definitions) 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 -- Volume 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--=--23:59:59-. .-Source--=--DBBackup-------. >--+---------------------+--+---------------------------+-------> '-TOTime--=--time-----' '-Source--=--+-DBBackup---+-' '-DBSnapshot-' .-Preview--=--No------. >--+---------------------+------------------------------------->< '-Preview--=--+-No--+-' '-Yes-'
Parameters
For example, if you issue the DSMSERV RESTORE DB command at 9:00 with TOTIME=NOW, the database is restored 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, the database is restored 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.
Command:
dsmserv restore db todate=05/12/1999 totime=14:45 preview=no
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. A device configuration file with the applicable device information (library, drive, and device class definitions) must also be available, or you must manually create one (see Administrator's Guide).
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.
Commands
dsmserv restore db devclass=tape volumenames=full1,full2 commit=no
dsmserv restore db devclass=tape volumenames=incr1 commit=no
dsmserv restore db devclass=tape volumenames=incr2 commit=yes
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.
Command
dsmserv restore db devclass=8MM volumenames=tape01,tape01 commit=yes