Results 1 to 10 of 10
  1. #1
    Join Date
    May 2003
    Posts
    369

    Unanswered: online incremental backups in DB2

    Previously we have been taking full online and offline backups in DB2.
    How does one run an incremental online backup in DB2? Thanks

    Scott

  2. #2
    Join Date
    Aug 2002
    Posts
    76

    Re: online incremental backups in DB2

    Check this out:

    http://www7b.boulder.ibm.com/dmdd/li...5adamache.html


    It is pretty easy: update the cfg parm trackmod to on is almost all you have to do.

  3. #3
    Join Date
    May 2003
    Posts
    369

    thanks just what I was looking for

    I appreciate your help. Our backup plan is:

    1. monthly offline full backup
    2. weekly full online backup
    3. daily online incremental backup

    Any suggestions to improve on this backup strategy for our DB2
    environment? Thanks

    Scott

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: thanks just what I was looking for

    Does sound good to me ...

    Cheers

    Sathyaram


    Originally posted by mixxalot
    I appreciate your help. Our backup plan is:

    1. monthly offline full backup
    2. weekly full online backup
    3. daily online incremental backup

    Any suggestions to improve on this backup strategy for our DB2
    environment? Thanks

    Scott

  5. #5
    Join Date
    Aug 2002
    Posts
    76

    Re: thanks just what I was looking for

    The one other thing I forgot to mention: Practice your recovery plan too! The restore from an incremental is pretty much like from a full, but you want to do it in test before your'e in a prod recovery in the early morning hours!

  6. #6
    Join Date
    Mar 2003
    Posts
    343
    So how does one recover from an incremental strategy? Say the strategy is as follows:

    1. Week 1 : Full Online a
    2.db is autoloaded and load files saved as fs backups
    3. Week 2 : Cumulative Incremental online b
    4.db is autoloaded and load files saved as fs backups
    5. Week 3 : Cumulative Incremental online c
    6.db is autoloaded and load files saved as fs backups
    7. Week 4 : Cumulative Incremental online d
    8.

    A failure at point 2 is a no-brainer. How about at points 4, 6 and 8. Lets take the worst case, a failure at point 8.

    My understanding is that the restore command has to run for tmstmp d to get the recovery history file, then tmstmp a and then tmstmp d again. Is that correct?

    And what would we need to do about the logs? If we have to rollforward through the logs, then all tablespaces will be marked as drop pending. Will appreciate if anyone can shed some light on this.

  7. #7
    Join Date
    Aug 2002
    Posts
    76
    The history is used in an incremental automatic restore... I think it would depends on what type of failure you are recovering from if you can use this,
    i.e. table corruption vs. full disk system failure.

    Recovery at 4, 6, and 8 should all be the same as long as these are incrementals and not deltas.

    automatic: db2 restore db dbname incremental automatic taken at ##### , where #### is the timestamp of the incremental at 3, 5, or 7.

    Then as far as rolling forward, not sure why it would be in drop pending... as long as you roll forward to the end of logs, it won't be in in any state other than consistent, and if you do roll to a specific time,
    it should just be in backup pending...
    either way, probably good idea to take a new full on or offline backup to reset your stage in the incremental backups.


    If for some reason you cannot do an automatic incremental the manual works too:

    again, assuming these are incrementals and not deltas or tablespace backups, you just need to do 2 restore commands before rolling forward:

    db2 restore db dbname incremental taken at #### , where #### is the timestamp of the most recent incremental
    and then:
    db2 restore db dbname incremental taken at #### , where tinmestamp is the last full

  8. #8
    Join Date
    Aug 2002
    Posts
    76
    sorry, forgot one more restore on the end of the manual example,

    after those 2 are entered, you do need to enter
    the db2 restore db dbname incremental taken at ##### where #### is again the timestamp of the most recent incremental

  9. #9
    Join Date
    Mar 2003
    Posts
    343
    OK. Lets say it is manual - I have specified cumulatives already.

    How can it be unnecessary to restore from the full? I will appreciate if you can explain it.

    The tables will be marked as drop pending because they were autoloaded nonrecoverable.

  10. #10
    Join Date
    May 2003
    Posts
    369

    excellent backup recovery plans

    Folks,

    Thanks for your input/feedback and contribution to my questions on DB2 backup and recovery. As always we all make this one of the very best DBA forums on the net. When I learn new things on DB2 I will add my experiences as well.

    Cheers
    Scott
    DB2 DBA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •