|
|
Well, I have to stop my writings, and answer some questions from askgyliu.
At the very beginning of this long post, I'd like to say I love this great discussion! I have been working as a lead DBA, architect on DB2 for Z, since more than 5 years ago. I think my point of view on this topic is somewhat trustworthy.
Now, let's begin.
我的理解是,这个问题的本质是在问,若是没有DB的介入,在数据库没停掉的情况下,普通的FS备份能否用来复原数据库。(在ORACLE中-alter database begin backup,或是DB2中-write suspect之后,FS备份是可以用来复原数据库的)
Modern disk tech has evolved a lot, such inventions like FlashCopy, XRC, PPRC change the mode and method we used to administrate our DBMS, especially in the backup/recovery fields. Based on these techs, it is now possible to make a system level consistent point without stop running DBMS or I/O suspension. And this possibility gives us wide choices of DR solution. A typical DR scenario is DBMS sudden crash/failure without beforehand I/O suspension, however, anyway, we still can recover it, using files backup which is taken out of DBMS control and involvement. Of course, this files backup is NOT a "ordinary" one, for instance, it's a disk mirror.
P35: The DB2 BACKUP SYSTEM and RESTORE SYSTEM utilities invoke DFSMShsm to back up and restore the copy pools.
You can use the DB2 BACKUP SYSTEM online utility to take incremental FlashCopy® backups of the data of a non-data-sharing DB2 subsystem or a DB2 data sharing group. All of the DB2 data sets must reside on volumes that are managed by DFSMSsms
The incremental FlashCopy backup feature is supported by the z/OS Version 1 Release 8, or later operating system.
<这里的FlashCopy®是指用DB2 BACKUP SYSTEM这个UTILITY来取得的,跟普通STORAGE意义上的FLASHCOPY,或是普通FS备份应当是不同的概念>
OK, maybe there are some diffenrence between BACKUP SYSTEM-trigger FC and "ordinary" FC. What does BACKUP SYSTEM really do?
1,Take an X lock to ensure no other backup utility. (We ignore.)
2,Suspend 32K page writes created prior to V8 NFM(New Function Mode). (The reason is what wangzhonnew told us, but this is NOT necessary, because V8 NFM allows to make CI size=page size, and you can avoid this suspension by REORG thi object in NFM. We ignore.)
3,Suspend data set creation, deletion, rename, and extension. (They are not I/O, just for the purpose of make file catalogs consistent. We ignore.)
4,Suspend system checkpoints. (Because BACKUP SYSTEM utility will record some info into DB2 catalog and BSDS, like a checkpoint does. We ignore.)
5,Prevents data set from pseudo close.(Nothing related to I/O. We ignore.)
6,Records the RBLP RBA or LRSN in the header page of DBD01 and writes the header page to DASD. (The purpose is to record some control info into DB2 catalog to mark this occurence of BACKUP SYSTEM. We ignore.)
7,Updates the BSDS with the system backup information. (The purpose is to record some control info into DB2 BSDS to mark this occurence of BACKUP SYSTEM. We ignore.)
8,Invokes DFSMShsm to take a FlashCopy of the "database" copy pool. (Just FlashCopy all disk volumes included in the data copypool. Nothing different from an ordinary FC.)
9,Invokes DFSMShsm to take a FlashCopy of the "log" copy pool if it is a full system backup. (Just FlashCopy all disk volumes included in the log copypool. Nothing different from an ordinary FC.)
10,Resumes all suspend activities above. (We have known there is nothing related to I/O suspension.We ignore.)
11,Release X lock.
12,Issue message to indicate BACKUP SYSTEM complete. (Because FlashCopy is instantaneous, need no time to wait. FC will do background.)
P52: System-level backups taken with the BACKUP SYSTEM utility will contain NOT LOGGED objects, but they cannot be used for object level recovery of NOT LOGGED objects.
<注意这个词System-level backups。这里的System-level backups是指用(DB2 )BACKUP SYSTEM拿到的,而不是普通意义上的OS SYSTEM LEVEL BACKUP?>
They are actually the same things, from the disks or files point of view. The real explaination of this sentence is, if the system-level FC contain NOT LOGGED objects, it can't be used to object-level recovery for these NOT LOGGED objects, because LOG APPLY is not possible (there is no log for this kind of objects).
P519: The principal tools for DB2 recovery are the QUIESCE, REPORT, COPY, RECOVER, MERGECOPY, BACKUP SYSTEM, and RESTORE SYSTEM utilities. This section also gives an overview of these utilities to help you with your backup and recovery planning.
<这些UTILITIES都是DB2 UTILITIES?只要用到了这些UTILITIES,某种程度DB2就被包括在certain level of DB2 involvement is expected? 就是说,不再是OS SYSTEM BACKUP而已,也不是FS LEVEL BACKUP而已?>
Not agree. During recovery, we can of course use utilities. When backup, generally, QUIESCE, COPY, MERGECOPY,BACKUP SYSTEM will be used.
QUIESCE is not related to I/O, and with DB2 9 new features, QUIESCE is NOT so important as it was. In fact, few Z customers use this utility in their production.
COPY is used to create an imagecopy, and record some info into DB2 catalog, such as SYSIBM.SYSCOPY. Since online imagecopy is widely used, there is no difference from OS-level backup, as I said before.
MERGECOPY is a backgroud utility, to make full IC(or incremental IC) and incremental IC consolidated together.
BACKUP SYSTEM, we have discussed above, nothing related to I/O suspension and DB2 involvements only for marking the occurence of the utility execution.
I have to create a new post at the current tail of this topic, continuing to reply.
[ 本帖最后由 Pythagoras 于 2008-12-1 15:15 编辑 ] |
|