Db2 is a is a family of relational database management systems within IBM's Information Management division that is centered on several relational database management system offerings. This section explains how to protect Db2 application consistent database data with Backup and DR in Linux environments.
The following are Db2 backup APIs used by Backup and DR:
Volume-level backup (Linux CBT and LVM snapshot): The
db2 set write suspend for databaseand
db2 set write resume for databaseAPI are used for freeze and thaw.
Standby (HADR) database: The
Db2 database deactivateand
Db2 database activateAPI are used for freeze and thaw.
Full+Incremental backup (file-based traditional): The
db2 backup db onlineAPI (traditional dump backups) provide full and incremental backups of the database in backup format. On recovery the
restore dbAPI recovers the database by physically overwriting the data area.
Db2 log backup: Logs are flushed using
Db2 archive log for database. During a log backup, the payload of the log segments is copied from the log area to the location specified by the parameter logarchmeth1.
How it works: Backup and DR volume-based backup with Linux CBT
Only changed blocks are tracked in the bitmap: no copy-on-writes, no I/O-intensive operations.
Data backup and recovery follows these steps:
The Backup and DR agent has CBT to track changed blocks in the database data area.
The agent calls the database API to freeze or pause database for data backup.
Agent creates LVM snapshot of database data area and synthesizes a bitmap.
Agent call to database API to unfreeze database.
Agent copies changed blocks to backup/recovery appliance, which then deletes the snapshot and catalogs the backup.
The appliance issues an internal snapshot and synthesizes a point-in-time virtual full backup.
For data recovery, Backup and DR instantly mounts a rewritable staging disk and brings the database online.
How it works: traditional file-based backup
Data backup and recovery with traditional file-based backup images follows these steps:
Backup and DR agent is deployed in the database server.
Mount staging disk on the database server.
Invoke Full+Incremental backup using traditional dump backup command, writing the backup image to the mounted disk.
Backup and DR takes an internal snapshot. Log backups are done in a similar fashion directly from the file-system at any desired schedule.
For data recovery, Backup and DR instantly mounts the staging disk to the database server and initiates the database restore operation. Logs can be played to any point in time after the database is restored.
For recovery, Backup and DR instantly mounts the staging disk to the database server and initiates the database restore operation. Logs can be played to any point in time after the database is restored.
Prepare the database for Backup and DR
The Backup and DR Db2 DBA guide
This page is one in a series of pages specific to protecting and recovering Db2 databases with Backup and DR. You can find additional information at: