db2 full-incremental-delta restore/recovery question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jimmy Chen

    db2 full-incremental-delta restore/recovery question

    Recently I've done a db2 backup and restore/recovery, but the process
    for recovering the database was different than what I thought to be.

    here is what I did:

    DB2 is set in online mode

    - backup -
    * backup db2 in full
    * insert record
    * backup db2 in incremental
    * insert record
    * backup db2 in delta
    * run command "archive log for db abc" and three log files archived to
    tape

    drop the database

    - restore/recovery -
    * restore delta backup - read from tape
    * restore incremental backup - read from tape
    * restore full backup - read from tape
    * restore delta backup - read from tape

    rollforwarding to end of log
    5 log files applied and it was much fast than I thought, during
    backup, there where at least 30 log files being created and archived
    to tape. Most of them were in size of about 1 GB, but the archive log
    applied was very small for roll forward.

    what logs being applied (needed) and why the data (delta backup) being
    read twice from tape? DB2 document no where tell the process in
    detail, any one can help to explain?

    Thanks,
    Jimmy
  • Pierre Saint-Jacques

    #2
    Re: db2 full-incremental-delta restore/recovery question

    The reason the reason the delta backup is read twice is because it is the
    most recent and therefore has the most recent values for the recovery
    history.
    The first read only gets the recovery history which is used to find A) the
    most recent FULL from which to start and B) the intervening incremental full
    or incremental deltas and C) the proper sequence in which to apply those.
    AFAIK, the sequence should be in your case:
    Incremental delta from tape - To get the sequence from history
    Full image from tape
    Full Incremental
    Delta Inceremental - Again to get the last of your insert.
    Roll Forward (If needed)
    If you set your DIAGLEVEL to 4 in the dbm cfg, you will be able to get msgs.
    which will indicate that flow.

    As to your log files, I'm not sure I understand what you are saying. Abit
    more detail in the mechanics might help.
    HTH, Pierre.
    "Jimmy Chen" <jimmych2000@ho tmail.com> a écrit dans le message de
    news:5ea6f8b4.0 312190005.72ff8 321@posting.goo gle.com...[color=blue]
    > Recently I've done a db2 backup and restore/recovery, but the process
    > for recovering the database was different than what I thought to be.
    >
    > here is what I did:
    >
    > DB2 is set in online mode
    >
    > - backup -
    > * backup db2 in full
    > * insert record
    > * backup db2 in incremental
    > * insert record
    > * backup db2 in delta
    > * run command "archive log for db abc" and three log files archived to
    > tape
    >
    > drop the database
    >
    > - restore/recovery -
    > * restore delta backup - read from tape
    > * restore incremental backup - read from tape
    > * restore full backup - read from tape
    > * restore delta backup - read from tape
    >
    > rollforwarding to end of log
    > 5 log files applied and it was much fast than I thought, during
    > backup, there where at least 30 log files being created and archived
    > to tape. Most of them were in size of about 1 GB, but the archive log
    > applied was very small for roll forward.
    >
    > what logs being applied (needed) and why the data (delta backup) being
    > read twice from tape? DB2 document no where tell the process in
    > detail, any one can help to explain?
    >
    > Thanks,
    > Jimmy[/color]


    Comment

    Working...