If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > incremental backup

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-19-09, 18:10
rdba rdba is offline
Registered User
 
Join Date: Aug 2009
Posts: 30
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?
Reply With Quote
  #2 (permalink)  
Old 09-19-09, 19:20
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #3 (permalink)  
Old 09-20-09, 14:20
rdba rdba is offline
Registered User
 
Join Date: Aug 2009
Posts: 30
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?
Reply With Quote
  #4 (permalink)  
Old 09-20-09, 14:57
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
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
Reply With Quote
  #5 (permalink)  
Old 09-21-09, 13:55
rdba rdba is offline
Registered User
 
Join Date: Aug 2009
Posts: 30
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.
Reply With Quote
  #6 (permalink)  
Old 09-21-09, 16:45
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
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.1.0.2 os 5.3.0.0
Reply With Quote
  #7 (permalink)  
Old 09-23-09, 00:08
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
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 00:14.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On