Backing Up and Restoring the System

 <  Day Day Up  >  

graphics/v8_icon.gif

The IBM DB2 COPY and RECOVER utilities are ideal for backing up and recovering DB2 objects, but sometimes recovery needs to be handled at a higher, system level. IBM introduced two new utilities with DB2 V8 to provide a system level, point-in-time recovery: BACKUP SYSTEM and RESTORE SYSTEM .


BACKUP SYSTEM

graphics/v8_icon.gif

The BACKUP SYSTEM utility invokes DFSMShsm to copy the disk volumes where DB2 data and the DB2 log reside. The utility can copy data for a single DB2 subsystem (non-data sharing) or a data sharing group . All of the data sets to be copied must be SMS-managed data sets.


BACKUP SYSTEM is ideal for backing up all of the data for a single application, such as SAP R/3 or PeopleSoft.

CAUTION

In a data-sharing environment, if there are any failed or abnormally quiesced members , the BACKUP SYSTEM request fails.


When BACKUP SYSTEM is run, a copy version is created. A copy version is a point-in-time copy of the data maintained by DFSMShsm . Each DB2 system has an associated set of copy pools, one for the databases and another for the logs. Up to 15 copy versions can be maintained. The utility copies the volumes that are associated with the copy pool backup storage group. You can add new volumes to the storage group without having to redefine the copy pool.

Before running the BACKUP SYSTEM utility you must decide if you want a full or data only copy to be made. The default is FULL , which causes the utility to copy both the database copy pool and the log copy pool. Alternatively, you can specify DATA ONLY . This indicates that BACKUP SYSTEM will copy only the database copy pool (and not the log copy pool).

The BACKUP SYSTEM history is recorded in the BSDSs.

To execute BACKUP SYSTEM , the process or user running the utility must have either SYSADM or SYSCTRL authority.

BACKUP SYSTEM Phases

The BACKUP SYSTEM utility has three phases:

UTILINIT

Sets up and initializes the utility

COPY

Copies the data

UTILTERM

Performs the final utility cleanup


BACKUP SYSTEM Concurrency

The BACKUP SYSTEM utility can run concurrently with any other DB2 utility. But only one BACKUP SYSTEM job can be running at any one time.

Keep in mind, too, that the BACKUP SYSTEM utility will wait until the following activities complete before it begins to execute:

  • Data sets being extended

  • 32K pages being written

  • Close page set control log records being written

  • Data sets being created or deleted ( CREATE or DROP )

  • Data sets being renamed (such as during an online reorganization)

BACKUP SYSTEM Guidelines

Before running BACKUP SYSTEM , be sure to verify the following:

  • All of the data sets to be copied are SMS-managed.

  • You are running z/OS V1R5 (or greater).

  • Your disk units support ESS FlashCopy.

  • You have defined a copy pool for your database data ( FULL or DATA ONLY ).

  • If you plan to also copy the logs, be sure to define a copy pool for your logs.

  • You must define an SMS backup storage group for each storage group in the copy pools.

RESTORE SYSTEM

graphics/v8_icon.gif

Similar to BACKUP SYSTEM , the RESTORE SYSTEM utility uses DFSMShsm behind the scenes to recover a DB2 subsystem or a data sharing group to a previous point-in-time. RESTORE SYSTEM uses the data that was copied by a previous execution of the BACKUP SYSTEM utility. Remember, all of the data sets that you want to recover must be SMS-managed.


Although DFSMShsm can maintain multiple backup versions of copy pools, you cannot specify a particular backup version to be used by the RESTORE SYSTEM utility. RESTORE SYSTEM always uses the latest version before the log truncation point.

NOTE

You can specify the log truncation point with the CRESTART SYSPITR option of the DSNJU003 utility. Refer to Chapter 35, "Stand-alone Utilities and Sample Programs," for more information about DSNJU003 .


To execute RESTORE SYSTEM , the process or user running the utility must have SYSADM authority.

RESTORE SYSTEM Phases

The RESTORE SYSTEM utility has four phases:

UTILINIT

Sets up and initializes the utility

RESTORE

Finds and restores the volume copies (if the LOGONLY option is not specified)

LOGAPPLY

Applies the outstanding log changes to the database

UTILTERM

Performs the final utility cleanup


RESTORE SYSTEM Concurrency Considerations

No other utilities can run when RESTORE SYSTEM is running.

RESTORE SYSTEM Guidelines

Before running RESTORE SYSTEM , perform the following tasks :

  1. Stop DB2.

  2. Run DSNJU003 to specify the log truncation point for the point-in-time to which the system is to be recovered. (Note: You must be running in DB2 V8 new function mode.)

  3. Start DB2. When the restart completes, DB2 enters system RECOVER -pending and access maintenance mode. During system RECOVER -pending mode, the only action you can take is to run the RESTORE SYSTEM utility.

After running the RESTORE SYSTEM utility job, be sure to take the following steps:

  1. Stop and start each DB2 subsystem or member to remove it from access maintenance mode.

  2. Issue the DISPLAY UTIL command to check for any utilities that are executing. If any other utilities are running, use the TERM UTIL command to end them.

  3. Recover any table space in RECP status and rebuild or recover any index in RECP or RBDP status.

  4. If a CREATE TABLESPACE , CREATE INDEX , or data set extension has failed, recover or rebuild any objects in the logical page list.

 <  Day Day Up  >  


DB2 Developers Guide
DB2 Developers Guide (5th Edition)
ISBN: 0672326132
EAN: 2147483647
Year: 2004
Pages: 388

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net