Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2009
    Posts
    42

    Unanswered: incremental backup

    Version 9.1 on AIX

    Lets assume that I have a 50GB tablespace. There is one table in this tablespace, some data is modified in this table after the full backup.


    During incremental database backup, will DB2 read the whole 50GB tablespace to look for changed pages?

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Changed pages only.

    But 50 GB is not all that large. How long does a full backup take? I would guess less than 20 minutes.

    It would probably help to use multiple file locations for the backup path so that DB2 can use more parallelism. See the Command Reference manual for examples. If the different paths on are on separate mount points, that might help the most, but it would probably help even if on the same mount point.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Aug 2009
    Posts
    42
    I understand each tablespace has a flag which gets set when there are changed pages, but how does DB2 know which pages have changed and which have not?

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    DB2 has a spacemap where this information about changed pages is flagged. You have to turn on the TRACKMOD database parm to enable incremental backups and then DB2 will start keeping track of which pages have been modified since the last incremental backup. There is some extra overhead and possible contention of setting TRACKMOD to ON if you have very high insert rates.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  5. #5
    Join Date
    Aug 2009
    Posts
    42
    We noticed full and incremental backups take almost the same time if there is at least one changed page in each tablespace so it looks DB2 is reading all pages and not just the modified pages.

  6. #6
    Join Date
    Nov 2005
    Location
    IL
    Posts
    557
    It might be because you are taking incremental and not delta. With Incremental it read all the changes from the last full. With Delta it only read changes from the last backup regardless what kind it was.
    --
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows

    DB2 v9.7.0.6 os 6.1.0.0

  7. #7
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Quote Originally Posted by rdba
    We noticed full and incremental backups take almost the same time if there is at least one changed page in each tablespace so it looks DB2 is reading all pages and not just the modified pages.

    If every tablespace has at least one changed page, then DB2 will scan all pages in the tablespace to look for pages that have been modified. There is a bit/flag per tablespace that lets incremental backup know whether there is a changed page in that tablespace or not, that's the extent of DB2 knowledge. So, if all tablespaces have modified pages, then DB2 has to read every page in the database for incremental backup. In this sense the reading will be no different for non-incremental and incremental backups. So, it may take same amount of time during incremental db2 database backup. However, the backup image can be significantly smaller for incremental backups.
    Last edited by db2girl; 09-23-09 at 01:14.

Posting Permissions

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