Optimization of availability during backup and recovery
Because backup and recovery affects data availability, you should understand the implications of various activities, including running utilities, logging, archiving, disaster recovery, and Db2 restart.
- Running utilities
-
- To reduce recovery time, you can use the RECOVER utility to recover a list of objects in parallel.
- To reduce copy time, you use the COPY utility to make image copies of a list of objects in parallel.
- Logging
-
Important: Do not use striped active logs for disaster recovery.
- To speed recovery, place active or archive logs on disk. If you have enough space, use more active logs and larger active logs.
- Make the buffer pools and the log buffers large enough to be efficient.
- If Db2 is forced to a single mode of operation for the bootstrap data set or logs, you can usually restore dual operation while Db2 continues to run. Dual active logging improves recovery capability in the event of a disk failure. You can place copies of the active log data sets and the bootstrap data sets on different disk units.
- If an I/O error occurs when Db2 is writing to the log, Db2 continues to operate. If the error is on the active log, Db2 moves to the next data set. If the error is on the archive log, Db2 dynamically allocates another archive log data set.
- Restart
- Many recovery processes involve restarting Db2. You can minimize Db2 restart time after an outage to get the Db2 subsystem up and running quickly.
- For non-data-sharing systems, you can limit backout activity during Db2 restart. You can postpone the backout of long-running transactions until after the Db2 subsystem is operational.
- Some restart processing can occur concurrently with new work. You can choose to postpone some processing to get Db2 running more quickly.
- During a restart, Db2 applies data changes from the log. This technique ensures that data changes are not lost, even if some data was not written at the time of the failure. Some of the work to apply log changes can run in parallel.
- You can register Db2 with z/OS Automatic Recovery Manager (ARM). This facility automatically restarts Db2 in the event of a failure.
- Archiving
- If you archive to tape, be sure that you have enough tape drives. Db2 then does not need to wait for
an available drive on which to mount an archive tape during recovery.
Recommendation: For fast recovery, keep at least 24 hours of logs in the active logs, and keep as many archive logs as possible (48 hours of logs, for example) on disk. Archiving to disk and letting HSM (Hierarchical Storage Management) migrate to tape is a good practice.
- Disaster recovery
- In the case of a disaster that causes a complete shutdown of your local Db2 subsystem, your site needs to ensure that documented procedures are available for disaster recovery. For example, a procedure for off-site recovery keeps your site prepared.
Optionally, you can use DFSMShsm to automatically manage space and data availability among storage devices in your system. For example, DFSMShsm manages disk space by moving data sets that have not been used recently to less expensive storage. DFSMShsm makes data available for recovery by automatically copying new or changed data sets to tape or disk.