Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2002
    Posts
    123

    Unanswered: DB Backup / Restore strategy

    Hi,

    I'm just wondering if this backup/restore setup will work...we have a production db and backup db. The production db has a full backup done on the 1st Sunday of every month and an incremental for the rest of the days.

    We plan to copy over the backup images (with the logs included as a part of the image) to our backup server every night and then perform a restore.

    If I try the full restore and an automatic incremental restore after, it works fine but fails to successfully restore the next incremental image after that. (I'm assuming this is because an automatic incremental restore 'always' requires a full backup image restore first?)

    This currently does not work ---

    1.
    (FULL BACKUP RESTORE -- THIS PART WORKS FINE)
    db2 restore db dbname from /dir1/ taken at 20080906050002 logtarget /home/dir2/logs/

    db2 rollforward db dbname to end of logs and stop overflow log path \(/home/dir2/logs\)

    2.
    (INCREMENTAL BACKUP RESTORE -- THIS PART WORKS FINE)
    db2 restore db dbname incremental automatic from /dir1/ taken at 20080928050002 logtarget /home/dir2/logs/ REPLACE EXISTING

    db2 rollforward db dbname to end of logs and stop overflow log path \(/home/dir2/logs\)

    3. (INCREMENTAL BACKUP RESTORE -- THIS PART FAILS)
    db2 restore db dbname incremental automatic from /dir1/ taken at 20080929050002 logtarget /home/dir2/logs/ REPLACE EXISTING

    db2 rollforward db dbname to end of logs and stop overflow log path \(/home/dir2/logs\)


    I'm assuming this will work (without the automatic keyword)---

    1. db2 restore db dbname from /dir1/ taken at 20080906050002 logtarget /home/dir2/logs/

    db2 rollforward db dbname to end of logs and stop overflow log path \(/home/dir2/logs\)

    2. db2 restore db dbname incremental from /dir1/ taken at 20080928050002 logtarget /home/dir2/logs/ REPLACE EXISTING

    db2 rollforward db dbname to end of logs and stop overflow log path \(/home/dir2/logs\)

    3. db2 restore db dbname incremental from /dir1/ taken at 20080929050002 logtarget /home/dir2/logs/ REPLACE EXISTING

    db2 rollforward db dbname to end of logs and stop overflow log path \(/home/dir2/logs\)

    Please correct me if I'm wrong.. thanks!
    Last edited by db2user; 10-06-08 at 17:02.

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    if using incremental - you should only restore the base/full backup and last incremental backup. if using delta backup you need to restore the full and each delta. you can also use the recover command
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Dec 2002
    Posts
    123
    Quote Originally Posted by przytula_guy
    if using incremental - you should only restore the base/full backup and last incremental backup.
    Hi..do you mean that if you're using 'incremental automatic' then you should only restore the base/full backup and last incremental backup? I thought this method was used if using the 'automatic' option. And if I'm using simply incremental (no automatic keyword).. why won't it work if I restore each incremental backup daily? Thank you!

  4. #4
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    the incremental keeps the modifications from last backup - second incremental has data from first incremental and changes after incremental....
    delta keeps modifications from last delta only
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    I suggest you read the manual about restoring from the incremental backup. If you don't use the AUTOMATIC keyword, you have to specify the backup images yourself in the correct order: latest incremental, full (base), first incremental, second..., last incremental. Obviously, you only do a rollforward once, when the entire restore is complete.
    ---
    "It does not work" is not a valid problem statement.

  6. #6
    Join Date
    Dec 2002
    Posts
    123
    thanks for the replies.. am aware that if you don't use the AUTOMATIC keyword, then all the backup images between the full and last incremental must be restored in order.. the problem is that I want to do a restore of the latest incremental on a daily basis on our backup server... it seems like the delta option might work in this case?

  7. #7
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    The INCREMENTAL DELTA backups will work absolutely in the same manner as the INCREMENTAL, because they _are_ incremental.
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

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