1. v9.5以后默认就包含log的备份了,以前的版本需要在备份语句中加入include logs。
[db2inst1@DB2test183 backup]$ db2ckbkp -h SAMPLE.0.db2inst1.DBPART000.20140116124054.001
=====================
MEDIA HEADER REACHED:
=====================
Server Database Name -- SAMPLE
Server Database Alias -- SAMPLE
Client Database Alias -- SAMPLE
Timestamp -- 20140116124054
Database Partition Number -- 0
Instance -- db2inst1
Database Configuration Type -- 0 (Non-shared data)
Sequence Number -- 1
Database Member ID -- 0
Release ID -- 0x1000 (DB2 v10.5)
AL version -- V:10 R:5 M:0 F:1 I:0 SB:0
Database Seed -- 0x6942A140
DB Comment's Codepage (Volume) -- 0
DB Comment (Volume) --
DB Comment's Codepage (System) -- 0
DB Comment (System) --
Authentication Value -- 255 (Not specified)
Backup Mode -- 0 (Offline)
Includes Logs -- 0 (No)
Compression -- 0 (Uncompressed)
Backup Type -- 0 (Database-level)
Backup Granularity -- 0 (Non-incremental)
Merged Backup Image -- 0 (No)
Status Flags -- 0x1
Consistent on this member
System Catalogs in this image -- 1 (Yes)
Catalog Partition Number -- 0
DB Codeset -- UTF-8
DB Territory -- US
LogID -- 1389261152
LogPath -- /home/db2inst1/db2inst1/NODE0000/SQL00001/LOGSTREAM0000/
Backup Buffer Size -- 3936256 (961 4K pages)
Number of Sessions -- 1
Platform -- 0x1E (Linux-x86-64)
The proper image file name would be:
SAMPLE.0.db2inst1.DBPART000.20140116124054.001
[1] Buffers processed: ############################################
Image Verification Complete - successful.
[db2inst1@DB2test183 backup]$ ls
BBB.0.db2inst1.DBPART000.20140116103516.001
BBB.0.db2inst1.DBPART000.20140116123436.001
SAMPLE.0.db2inst1.DBPART000.20140116124054.001
SAMPLE.0.db2inst1.DBPART000.20140116124600.001
[db2inst1@DB2test183 backup]$ db2ckbkp -h SAMPLE.0.db2inst1.DBPART000.20140116124600.001
=====================
MEDIA HEADER REACHED:
=====================
Server Database Name -- SAMPLE
Server Database Alias -- SAMPLE
Client Database Alias -- SAMPLE
Timestamp -- 20140116124600
Database Partition Number -- 0
Instance -- db2inst1
Database Configuration Type -- 0 (Non-shared data)
Sequence Number -- 1
Database Member ID -- 0
Release ID -- 0x1000 (DB2 v10.5)
AL version -- V:10 R:5 M:0 F:1 I:0 SB:0
Database Seed -- 0x6942A140
DB Comment's Codepage (Volume) -- 0
DB Comment (Volume) --
DB Comment's Codepage (System) -- 0
DB Comment (System) --
Authentication Value -- 255 (Not specified)
Backup Mode -- 1 (Online)
Includes Logs -- 1 (Yes)
Compression -- 0 (Uncompressed)
Backup Type -- 0 (Database-level)
Backup Granularity -- 0 (Non-incremental)
Merged Backup Image -- 0 (No)
Status Flags -- 0x21
Consistent on this member
LOGARCHMETH1 is set
System Catalogs in this image -- 1 (Yes)
Catalog Partition Number -- 0
DB Codeset -- UTF-8
DB Territory -- US
LogID -- 1389261152
LogPath -- /home/db2inst1/db2inst1/NODE0000/SQL00001/LOGSTREAM0000/
Backup Buffer Size -- 2101248 (513 4K pages)
Number of Sessions -- 1
Platform -- 0x1E (Linux-x86-64)
The proper image file name would be:
SAMPLE.0.db2inst1.DBPART000.20140116124600.001
[1] Buffers processed: #################################################################################
Image Verification Complete - successful.
File Number [000] = 0
File Number [001] = 1
2.检查备份集中是否包含log: db2ckbkp -h filename
[db2inst1@DB2test183 backup]$ db2ckbkp -h SAMPLE.0.db2inst1.DBPART000.20140116124054.001
=====================
MEDIA HEADER REACHED:
=====================
Server Database Name -- SAMPLE
Server Database Alias -- SAMPLE
Client Database Alias -- SAMPLE
Timestamp -- 20140116124054
Database Partition Number -- 0
Instance -- db2inst1
Database Configuration Type -- 0 (Non-shared data)
Sequence Number -- 1
Database Member ID -- 0
Release ID -- 0x1000 (DB2 v10.5)
AL version -- V:10 R:5 M:0 F:1 I:0 SB:0
Database Seed -- 0x6942A140
DB Comment's Codepage (Volume) -- 0
DB Comment (Volume) --
DB Comment's Codepage (System) -- 0
DB Comment (System) --
Authentication Value -- 255 (Not specified)
Backup Mode -- 0 (Offline)
Includes Logs -- 0 (No)
Compression -- 0 (Uncompressed)
Backup Type -- 0 (Database-level)
Backup Granularity -- 0 (Non-incremental)
Merged Backup Image -- 0 (No)
Status Flags -- 0x1
Consistent on this member
System Catalogs in this image -- 1 (Yes)
Catalog Partition Number -- 0
DB Codeset -- UTF-8
DB Territory -- US
LogID -- 1389261152
LogPath -- /home/db2inst1/db2inst1/NODE0000/SQL00001/LOGSTREAM0000/
Backup Buffer Size -- 3936256 (961 4K pages)
Number of Sessions -- 1
Platform -- 0x1E (Linux-x86-64)
The proper image file name would be:
SAMPLE.0.db2inst1.DBPART000.20140116124054.001
[1] Buffers processed: ############################################
Image Verification Complete - successful.
[db2inst1@DB2test183 backup]$ ls
BBB.0.db2inst1.DBPART000.20140116103516.001
BBB.0.db2inst1.DBPART000.20140116123436.001
SAMPLE.0.db2inst1.DBPART000.20140116124054.001
SAMPLE.0.db2inst1.DBPART000.20140116124600.001
[db2inst1@DB2test183 backup]$ db2ckbkp -h SAMPLE.0.db2inst1.DBPART000.20140116124600.001
=====================
MEDIA HEADER REACHED:
=====================
Server Database Name -- SAMPLE
Server Database Alias -- SAMPLE
Client Database Alias -- SAMPLE
Timestamp -- 20140116124600
Database Partition Number -- 0
Instance -- db2inst1
Database Configuration Type -- 0 (Non-shared data)
Sequence Number -- 1
Database Member ID -- 0
Release ID -- 0x1000 (DB2 v10.5)
AL version -- V:10 R:5 M:0 F:1 I:0 SB:0
Database Seed -- 0x6942A140
DB Comment's Codepage (Volume) -- 0
DB Comment (Volume) --
DB Comment's Codepage (System) -- 0
DB Comment (System) --
Authentication Value -- 255 (Not specified)
Backup Mode -- 1 (Online)
Includes Logs -- 1 (Yes)
Compression -- 0 (Uncompressed)
Backup Type -- 0 (Database-level)
Backup Granularity -- 0 (Non-incremental)
Merged Backup Image -- 0 (No)
Status Flags -- 0x21
Consistent on this member
LOGARCHMETH1 is set
System Catalogs in this image -- 1 (Yes)
Catalog Partition Number -- 0
DB Codeset -- UTF-8
DB Territory -- US
LogID -- 1389261152
LogPath -- /home/db2inst1/db2inst1/NODE0000/SQL00001/LOGSTREAM0000/
Backup Buffer Size -- 2101248 (513 4K pages)
Number of Sessions -- 1
Platform -- 0x1E (Linux-x86-64)
The proper image file name would be:
SAMPLE.0.db2inst1.DBPART000.20140116124600.001
[1] Buffers processed: #################################################################################
Image Verification Complete - successful.
3.检查当前备份机需要前滚的日志列表: db2ckbkp -a filename
File Number [000] = 0
File Number [001] = 1
___________________________________________________________________________________
版权所有,文章允许转载,但必须以链接方式注明源地址,否则追究法律责任!
Author: laven54 (lurou)
Email: laven54@163.com
Blog: http://blog.youkuaiyun.com/laven54