Checking Useful Backup Information
How to proceed if you need to check some information about your backup, such as what kind of backup it is (online, offline, incremental, full or delta) and what was the logs used during the backup image process
If you need information about backup images, such as type and range of logs used, perform the following command:
db2 list history backup all for <db_name>
It will show you all information about the backup images created recently.
Example:
db2 list history backup all for DBASE1
List History File for DBASE1
Number of matching file entries = 3
Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID
-- --- ------------------ ---- --- ------------ ------------ --------------
B D 20080331213002001 N D S0030133.LOG S0030134.LOG
----------------------------------------------------------------------------
Contains 9 tablespace(s):
00001 SYSCATSPACE
00002 USERSPACE1
00003 TS_RECORD
00004 TS_ENVIRONMENT
00005 TS_SLOTS
00006 TS_DATA
00007 TS_INDEXES
00008 TS_LONG
00009 SYSTOOLSPACE
----------------------------------------------------------------------------
Comment: DB2 BACKUP DBASE1 ONLINE
Start Time: 20080331213002
End Time: 20080331215718
Status: E
----------------------------------------------------------------------------
EID: 31967 Location: /backup/dbase1_bkp
Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID
-- --- ------------------ ---- --- ------------ ------------ --------------
B D 20080331213002002 N D S0030133.LOG S0030134.LOG
----------------------------------------------------------------------------
Contains 9 tablespace(s):
00001 SYSCATSPACE
00002 USERSPACE1
00003 TS_RECORD
00004 TS_ENVIRONMENT
00005 TS_SLOTS
00006 TS_DATA
00007 TS_INDEXES
00008 TS_LONG
00009 SYSTOOLSPACE
----------------------------------------------------------------------------
Comment: DB2 BACKUP DBASE1 ONLINE
Start Time: 20080331213002
End Time: 20080331215718
Status: E
----------------------------------------------------------------------------
EID: 31968 Location: /backup/dbase1_bkp
Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID
-- --- ------------------ ---- --- ------------ ------------ --------------
B D 20080331213002003 N D S0030133.LOG S0030134.LOG
----------------------------------------------------------------------------
Contains 9 tablespace(s):
00001 SYSCATSPACE
00002 USERSPACE1
00003 TS_RECORD
00004 TS_ENVIRONMENT
00005 TS_SLOTS
00006 TS_DATA
00007 TS_INDEXES
00008 TS_LONG
00009 SYSTOOLSPACE
----------------------------------------------------------------------------
Comment: DB2 BACKUP DBASE1 ONLINE
Start Time: 20080331213002
End Time: 20080331215718
Status: E
----------------------------------------------------------------------------
EID: 31969 Location: /backup/dbase1_bkp
As you can see, it is possible with the command to check several information about the created backup images, such as which tablespaces was made backup, what was the range of log files used, the directory where the image was created, the backup type and the start / end time of the backup process.
Some of the important information in the history file is:
Op
This is the operation that was performed. In the exampled above it is a "B" which stands for backup. A list of the possible values for Op can be found in the Command Reference under the LIST HISTORY command.
Obj
This is the granularity of the backup. "D" for database backup . "T" for tablespace backup.
Earliest Log
In the case of an online backup, this is the first log required for the rollforward operation.
Current Log
The last log that was written to when the backup completed. In the case of an online backup, this is the minimum log required for the backup to complete.
Type
For backup operations, type "F" means full offline backup, "N" means full online backup, "I" means incremental offline backup, "O" means incremental online backup, "D" means delta offline backup and "E" means delta online backup.
The status of a backup operation: A - active, I - inactive, E - expired, or D - deleted