Administrator's Reference

DSMSERV RESTORE DB (Restore the Database)

Use the DSMSERV RESTORE DB command to:

To restore an ADSM database, you can use one of the following:

Roll-forward recovery
Restores the database or a single database backup volume to its most current state by loading the most recent database backup series (the last full backup and any incremental backups that apply to that full backup) and using recovery log records to apply any changes made to the database since the last backup was created

Point-in-time recovery
Restores the database to the point in time when a specific backup version was created

Notes:

  1. If the original database or recovery log volumes are available, you issue only the DSMSERV RESTORE DB command. However, if those volumes have been lost, you must first issue the DSMSERV FORMAT command to initialize the database and recovery log, then issue the DSMSERV RESTORE DB command.

  2. The DSMSERV RESTORE DB command uses backup versions of the database you create using the BACKUP DB command or backup versions created automatically by ADSM based on the settings you specify with the DEFINE DBBACKUPTRIGGER command. You cannot use the DSMSERV RESTORE DB command to load an offline salvage dump created with the DSMSERV DUMP DB command.

  3. After a point-in-time recovery, issue the AUDIT VOLUME command to audit all DISK volumes and resolve any inconsistencies between database information and storage pool volumes. If you saved a copy of the volume history file before restoring the database, examine that file to find out about sequential access storage pool volumes that were deleted or reused since the point in time to which the database was restored.

Syntax for Restoring a Database to Its Most Current State

You can perform a roll-forward recovery for an entire database, using the syntax that follows, if the following are true:

When you enter the DSMSERV RESTORE DB command with no parameters, ADSM restores the database to its most current state as follows:

  1. Reads the recovery log to determine which volumes contain the most recent database backup series.

  2. Requests volume mounts to load the most recent backup series (the last full backup and any incremental backups that apply to that full backup) until the entire backup series is loaded.

  3. Uses the recovery log to update the database to its most current state.
                        .-Preview--=--No-------.
>>-DSMSERV RESTORE DB---+----------------------+---------------><
                        '-Preview--=--+-No--+--'
                                      '-Yes-'
 

Parameters for Restoring a Database to Its Most Current State

Preview=value

Specifies whether you want ADSM to display a list of the volumes needed to restore the database to its most current state, without performing the restore operation. This parameter is optional. The default value is NO. Possible values are:

No

Specifies that you want to restore the database.

Yes

Specifies that you want to display the list of database backup volumes but not restore the database.

Syntax for Restoring a Single Database Volume to Its Most Current State

You can perform a roll-forward recovery for a single database volume, using the syntax that follows, if both of the following are true:

When you use the DSMSERV RESTORE DB command to restore a single database volume, ADSM performs the steps described in Syntax for Restoring a Database to Its Most Current State, but only the pages for the specified database volume are restore.

When ADSM restores a mirrored database volume, only one copy of the volume is restored. You must use the VARY command with the ONLINE parameter to make the mirrored volumes available again. ADSM then synchronizes the mirrored volumes with the restored volume.

>>-DSMSERV RESTORE DB------------------------------------------->
 
                       .-Preview--=--No-------.
>---DBVol--=--volname--+----------------------+----------------><
                       '-Preview--=--+-No--+--'
                                     '-Yes-'
 

Parameters for Restoring a Single Database Volume to Its Most Current State

DBVol=volname

Specifies the name of the database volume to restore. This parameter is required.

If the database volume is mirrored, you can specify the name of any volume that contains a mirrored copy of the volume you want to restore. Use the DSMSERV DISPLAY DBVOLUMES command to find the volume names.

Preview=value

Specifies whether you want ADSM to display a list of the database backup volumes needed to restore the database volume you specify, without performing the restore. This parameter is optional. The default value is NO. Possible values are:

No

Specifies that you want to restore the database volume.

Yes

Specifies that you want to display the list of database backup volumes but not restore the database.

Syntax for Restoring a Database to a Specific Point in Time--History File Available

If a backup copy of volume history information is available, you can restore a database to a specific point in time using the syntax defined below. At least one volume history file must be defined with the VOLUMEHISTORY option in the dsmserv.opt file, and at least one device configuration file must be defined with the DEVCONFIG option in the dsmserv.opt file. The server program must be able to open and read the files successfully when running the DSMSERV RESTORE DB command.

If the volume history file is not available, and you want to perform a point-in-time recovery, you can use the recovery method described in Syntax for Restoring a Database to a Specific Point in Time--History File Unavailable.

If a device configuration file is not available, you can manually create one. See ADSM Administrator's Guide. ADSM restores the database as follows:

  1. Uses the volume history file to locate the database backup volumes needed

  2. Requests mounts and loads data from database backup volumes as required to restore the database volume to the specified time
>>-DSMSERV RESTORE DB---TODate--=--date---+-------------+------->
                                          '-TOTime=time-'
 
    .-Preview--=--No-------.
>---+----------------------+-----------------------------------><
    '-Preview--=--+-No--+--'
                  '-Yes-'
 

Parameters for Restoring a Database to a Specific Point in Time--History File Available

TODate=date

Specifies the date to which to restore the database. This parameter is required. Possible values are:

MM/DD/YYYY

Specifies that you want to restore a database using the most recent backup series that was created prior to a specific date.

TODAY

Specifies that you want to restore a database using the most recent backup series that was created prior to the current date.

TODAY-numdays or -numdays

Specifies that you want to restore a database using the most recent backup series that was created prior to a specific number of days before the current date.

For example, to restore a database using the most recent backup series that was created prior to one week ago, you can enter either of the following:

dsmserv restore db todate=today-7
dsmserv restore db todate=-7

TOTime=time

Specifies the time of day to which to restore the database. This parameter is optional. The default is the end of the day (23:59:59). Possible values are:

HH:MM:SS

Specifies that you want to restore the database using the last backup series created on or before a specific time on the specified date.

NOW

Specifies that you want to restore the database using a backup series created on or before the current time on the specified date.

For example, if you issue the DSMSERV RESTORE DB command at 9:00 with TOTIME=NOW, ADSM restores the database using the last backup series created on or prior to 9:00 on the specified date.

NOW-numhours:numminutes or -numhours:numminutes

Specifies that you want to restore the database using a backup series created on or before the current time minus a specified number of hours (and optionally, minutes) 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, ADSM restores the database using the last backup series created on or prior to 5:30 on the specified date.

The following are sample commands to perform that task:

dsmserv restore db todate=today-7 totime=now-3:30
dsmserv restore db todate=-7 totime=-3:30

Preview=value

Specifies whether you want ADSM to display a list of the volumes needed to restore the database to the date and time you specify, without actually performing the restore operation. This parameter is optional. The default value is NO. Possible values are:

No

Specifies that you want to perform the restore operation.

Yes

Specifies that you want to display the list of database backup volumes to the specified time but not restore the database.

Syntax for Restoring a Database to a Specific Point in Time--History File Unavailable

If the volume history file is unavailable, you can use one or more DSMSERV RESTORE DB commands with the syntax shown below to restore an ADSM database to a specific point in time.

For example, if you need to load a full backup and one or more incremental backups, you can issue a DSMSERV RESTORE DB command to restore the full backup, then issue an additional DSMSERV RESTORE DB command for each incremental backup.

When you use multiple DSMSERV RESTORE DB commands, you must specify COMMIT=NO for each command except the last one you issue. For the last DSMSERV RESTORE DB command, you must specify COMMIT=YES to place the database in a consistent and usable state.

If you issue a DSMSERV RESTORE DB command with a COMMIT=NO parameter, and you decide not to load additional incremental backups, you must reissue the last DSMSERV RESTORE DB command you issued and specify COMMIT=YES.

If you issue a DSMSERV RESTORE DB command with a COMMIT=YES parameter, and you decide that you need to load one or more additional incremental backups, you must reissue all of the DSMSERV RESTORE DB commands in order, starting with the restore of the full backup and specifying COMMIT=NO for each one. Then, you can enter one or more additional DSMSERV RESTORE DB commands, and specify COMMIT=YES for the last one.

>>-DSMSERV RESTORE DB---DEVclass--=--devclassname--------------->
 
                       .-,--------.
                       V          |     .-COMMIT--=--No-------.
>---VOLumenames--=--+---volname---+--+--+---------------------+-><
                    '-FILE:filename--'  '-COMMIT--=--+-No--+--'
                                                     '-Yes-'
 

Parameters for Restoring a Database to a Specific Point in Time--History File Unavailable

DEVclass=devclassname

Specifies the name of the sequential access device class to use. Any device class you specify for a restore must be defined in an external device configuration file specified with the DEVCONFIG option in the dsmserv.opt file. This parameter is required.

If the device configuration file does not exist or has been lost, you can manually create one. See ADSM Administrator's Guide.

VOLumenames=volname

Specifies the backup volumes to use to restore the database. This parameter is required. Possible values are:

volname

Specifies the names of one or more volumes to use to restore the database. You can specify more than one backup volume by separating each volume name with a comma, with no intervening spaces. You must list the volumes in the order in which the backup was stored.

For example, if you want to use the backup volumes TAPE01, TAPE02, and TAPE03, specify the following:

  volumenames=tape01,tape02,tape03

FILE:filename

Specifies the name of a file that contains a list of the volumes to use to restore the database. The file name can be any valid file name. In the file, each volume name must be on a separate line. You must list the volumes in the order in which the backup was stored.

For example, if you want to use the backup volumes TAPE01, TAPE02, and TAPE03, create a file named VOLLIST that contains these lines:

TAPE01
TAPE02
TAPE03

You can then specify the volumes for the restore command as follows:

volumenames=file:vollist

COMMIT=commitvalue

Specifies whether this is the last restore command you intend to use to restore the database. This parameter is optional. The default value is NO. Possible values are:

No

Specifies that you intend to issue one or more additional DSMSERV RESTORE DB commands that list additional volumes. The database remains in an inconsistent and unusable state until you issue a DSMSERV RESTORE DB command with a COMMIT=YES parameter.

Specify COMMIT=NO if you plan to load additional backup volumes that contain one or more incremental backups.

Yes

Specifies that this is the last restore command you intend to use to restore the database. With this command, you are specifying the last backup volumes you want to use for the restore operation.

Specify COMMIT=YES only when you want to restore the database to the end of the last volume specified, and you do not plan to restore any additional backup volumes that contain incremental backups.

Examples

Task 1

Preview the list of volumes required to restore the database to its most current state.

Command:
dsmserv restore db preview=yes

Task 2

Restore the database to its state on March 31, 1995 at 2 pm. The volume history file is available.

Command:
dsmserv restore db todate=03/31/1995 totime=14:00 preview=no


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]