Tivoli Storage Manager for Sun Solaris Administrator's Reference


DSMSERV RESTORE DB (Restore the Database)

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:

  1. To restore a database or volume to its most current state, the log mode must have been set to roll-forward continuously from the time that the last backup series was created.

  2. If the original database or recovery log volumes are available, issue only the DSMSERV RESTORE DB command. If those volumes are not available, issue the DSMSERV LOADFORMAT to initialize the database and recovery log, then issue the DSMSERV RESTORE DB command.

  3. During a point-in-time restore, the recovery log is reformatted. If your recovery log is large, this may take a while.

  4. After a point-in-time restore, 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.

    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.

Restoring a Database to Its Most Current State

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

Preview
Specifies whether you want TSM to display a list of the volumes needed to restore the database to its most current state, but not to perform the restore. 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 only want to display the list of database backup volumes.

Examples

Task

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

Command:

dsmserv restore db preview=yes

Restoring a Single Database Volume to Its Most Current State

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

DBVol (Required)
Specifies the name of the database volume to restore. If the volume is mirrored, you can specify the name of any volume that contains a copy of the volume to be restored. Use the DSMSERV DISPLAY DBVOLUMES command to find the volume names.

Preview
Specifies whether you want TSM 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 only want to display the list of database backup volumes.

Examples

Task

Restore database volume dbvol2 to its most current state. The recovery log is available and intact.

Command:

dsmserv restore db dbvol=dbvol2

Restoring a Database to a Point in Time -- Volume History File

Available

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 -- Volume History File.

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

TODate (Required)
Specifies the date to which to restore the database. Possible values are:

MM/DD/YYYY
Specifies that you want to restore a database using the last backup series created before the specified date.

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

TODAY-numdays or -numdays
Specifies that you want to restore a database using the most recent backup series that was created the specified number of days before the current date.

TOTime
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 the specified 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, TSM 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, TSM restores the database using the last backup series created on or prior to 5:30 on the specified date.

Source
Specifies whether the database is restored using either database full and incremental backup volumes or snapshot database volumes. This parameter is optional. The default value is DBBackup. Possible values are:

DBBackup
Specifies that the database is restored as follows:
  1. Reads the volume history file to locate the database full and incremental backup volumes needed
  2. Requests mounts and loads data from database full and incremental backup volumes as required to restore the database volume to the specified time.

DBSnapshot
Specifies that the database is restored as follows:
  1. Reads the volume history file to locate the snapshot database volumes needed
  2. Requests mounts and loads data from snapshot database volumes as required to restore the volume to the specified time.

Preview
Specifies whether you want TSM to display a list of the volumes needed to restore the database, without performing the restore. 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 only want to display the list of database backup volumes.

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

Restoring a Database to a Point in Time -- Volume History File

Unavailable

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:

  1. Specify all the volume names for the same snapshot backup series
  2. List the volumes in the sequence in which the backup was written
  3. Specify COMMIT=YES

Notes:

  1. If you issue a DSMSERV RESTORE DB command with COMMIT=NO, and you decide not to load another incremental backup, reissue the last DSMSERV RESTORE DB command with COMMIT=YES.

  2. If you issue a DSMSERV RESTORE DB command with COMMIT=YES, and you decide to load an additional incremental backup, reissue all the DSMSERV RESTORE DB commands in order with COMMIT=NO on each. Then, enter any additional DSMSERV RESTORE DB commands, with COMMIT=YES on the last one.

Syntax

>>-DSMSERV RESTORE DB----DEVclass--=--device_class_name--------->
 
                         .-,-------------.
                         V               |
>-----VOLumenames--=--+----volume_name---+-+-------------------->
                      '-FILE:file_name-----'
 
      .-COMMIT--=--No------.
>-----+--------------------+-----------------------------------><
      '-COMMIT--=--+-No--+-'
                   '-Yes-'
 

Parameters

DEVclass (Required)
Specifies the name of the sequential access device class to use. The device class must be defined in a device configuration file. If a device configuration file is not available, you can manually create one (see Administrator's Guide).

VOLumenames (Required)
Specifies the backup volumes to use to restore the database. Possible values are:

volume_name
Specifies the names of the volumes. To specify multiple volumes, separate the names with commas and without intervening spaces. List the volumes in the order in which they were written.

FILE:file_name
Specifies the name of a file that contains a list of the volumes. Enter the volumes in the order in which they were written with each name on a separate line.

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

No
Specifies that you will issue one or more additional DSMSERV RESTORE DB commands.

Yes
Specifies that this is the last restore command to restore the database.

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


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