Chapter 8. Building a corporate backup and recovery strategy 327
Backup compression
Backup compression uses processor resources to create a compressed backup
image. This has the effect of increasing processor resources required to
decrease I/O; backup time increases to reduce I/O.
DB2 Merge Backup supports backup compression and by default, uses the same
compression library that was used to create the backup. Use the compress
keyword in the control file to determine whether the merged backup is to be
compressed.
8.7.4 DB2 Merge Backup with local disk backups
In this section we discuss a simple scenario where a merged database backup
was created using a base full backup image, and subsequent incremental
backup and delta backup images.
You only have to perform a regular full database backup one time for your
database. From this point forward, DB2 Merge Backup can refer to the previous
merged backup image.
Example 8-17 shows the initial regular full database backup and also shows a
backup cycle for the week that incorporates database and table space backups.
Example 8-17 Creating a merged backup strategy
-- Sunday. Previous full backup or merged full online backup image
db2 -v "backup db CSTINSDB on dbpartitionnums (0 to 4) online to
'/db2bkfs/full' include logs"
-- Tuesday/Thursday. Create an incremental backup image.
db2 -v "backup db CSTINSDB on dbpartitionnums (0 to 4) online incremental to
'/db2bkfs/incr' include logs"
-- Monday/Wednesday/Friday. Incremental delta backup image.
db2 -v "backup db CSTINSDB on dbpartitionnums (0 to 4) online incremental delta
to '/db2bkfs/delta' include logs"
-- Daily. Hot Table Space backups.
db2 -v "backup db CSTINSDB on dbpartitionnums (1 to 4) tablespace
(tsfactdata_2011q1) online to '/db2bkfs/hot_ts' include logs"
-- Sunday. Merge backup (Uses Full, Incr, Delta, Hot TS backup images)
db2mk -i db2inst1 -d CSTINSDB
In Example 8-17, a merged backup was created on Saturday.
328 Solving Operational Business Intelligence with InfoSphere Warehouse Advanced Edition
DB2 Merge Backup uses the recovery history file to determine that the following
backup images were required to create a merged backup:
򐂰 Full online database backup image from the previous Sunday
򐂰 Incremental backup image from Thursday
򐂰 Incremental delta backup image from Friday
򐂰 Table space backup for table space tsfactdata_2011q1 from Saturday
The merged backup image is an online backup image that contains the included
logs from the Friday delta image only.
Recovery to end of backup and included logs is available with this backup.
Archived and active transaction logs from after the last incremental delta backup
image are required to complete a roll forward to end of logs.
The output from DB2 Merge Backup is verbose and lists each backup image
identified as required for the merged backup. Example 8-18 shows the output for
the scenario discussed in this section.
Example 8-18 Sample output from db2mbk command for disk based merge process
MBKM031I DB2 Merge Backup for Linux, UNIX, and Windows 01.01.100(120405) 64 bits
07/10/12 (AIX bluejay06 1 6 00CE23234C00)
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+---
-9----+----10----+----11----+----12----+----13--
000001 merge database custinsdb
000002 PART(ALL)
000003 --START FROM "/stage_db2merge/" TAKEN AT 20120710065509
000004 output to "/stage_db2merge/"
000005
MBKB005I MBK control step start : 08:59:08.913.
MBKB005I [0] MBK control step start : 08:59:08.954.
MBKB006I [0] MBK control step end : 08:59:08.970.
MBKM031I [bluejay07] DB2 Merge Backup for Linux, UNIX, and Windows 01.01.100(120405) 64
bits 07/10/12 (AIX bluejay07 1 6 00CD8C944C00)
MBKB005I [bluejay07] [1] MBK control step start : 08:58:53.996.
MBKB006I [bluejay07] [1] MBK control step end : 08:58:54.074.
MBKB005I [bluejay07] [2] MBK control step start : 08:58:54.074.
MBKB006I [bluejay07] [2] MBK control step end : 08:58:54.122.
MBKB005I [bluejay07] [3] MBK control step start : 08:58:54.122.
MBKB006I [bluejay07] [3] MBK control step end : 08:58:54.169.
MBKB005I [bluejay07] [4] MBK control step start : 08:58:54.169.
MBKB006I [bluejay07] [4] MBK control step end : 08:58:54.226.
MBKB006I MBK control step end : 08:59:10.095.
MBKB053I MBK run step start : 08:59:10.095.
MBKB007I [0] MBK inventory step start : 08:59:10.095.
MBKB021I [0] The partition 0 backup image taken at 20120710085843 is involved in the
merge (type DELTA ONLINE DATABASE, device DISK)
MBKB021I [0] The partition 0 backup image taken at 20120710085322 is involved in the
merge (type INCREMENTAL ONLINE DATABASE, device DISK)
MBKB008I [0] MBK inventory step end : 08:59:10.109.
MBKB009I [0] MBK merge step start : 08:59:10.109.

Get Solving Operational Business Intelligence with InfoSphere Warehouse Advanced Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.