Topic
  • 12 replies
  • Latest Post - ‏2014-03-20T15:36:37Z by BE28_Larryk_Karl
BE28_Larryk_Karl
BE28_Larryk_Karl
11 Posts

Pinned topic Using DB2 to manage number of backups and logs

‏2013-06-07T16:34:38Z | and rec_his_retentn tsm

Does anyone know if  a  DB2 db  is setup to manage the retention of backups, db2 logs,  and history files (see below), and  if  LOGARCHMETH1 is set to TSM, will DB2 remove the archive logs stored in TSM?  Also, is there a best practice on using TSM vs having DB2 manage recovery data?

 

Number of database backups to retain   (NUM_DB_BACKUPS) = 7
 Recovery history retention (days)     (REC_HIS_RETENTN) = 7
 Auto deletion of recovery objects    (AUTO_DEL_REC_OBJ) = ON
 

  • BE28_Larryk_Karl
    BE28_Larryk_Karl
    11 Posts

    Re: Using DB2 to manage number of backups and logs

    ‏2013-06-07T19:32:26Z  

    To clarify, have set AUTO_DEL_REC_OBJ= ON, REC_HIS_RETENTN=7, and NUM_DB_BACKUPS= 7, and given that the archive logs are managed by tsm, if a db backup is taken that results in 8 images, the oldest image and all its dependent logs and history records are deleted.  Does that include the archive logs stored in TSM?

  • Kelly Rodger
    Kelly Rodger
    8 Posts

    Re: Using DB2 to manage number of backups and logs

    ‏2013-06-08T03:46:11Z  

    To clarify, have set AUTO_DEL_REC_OBJ= ON, REC_HIS_RETENTN=7, and NUM_DB_BACKUPS= 7, and given that the archive logs are managed by tsm, if a db backup is taken that results in 8 images, the oldest image and all its dependent logs and history records are deleted.  Does that include the archive logs stored in TSM?

    Yes it does.  I think the documentation is fairly clear about this, that as long as you're using LOGARCHMETH1=TSM it will behave the way I think you're expecting, but let me know if it's not clear.

    http://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.admin.config.doc/doc/r0051456.html

  • BE28_Larryk_Karl
    BE28_Larryk_Karl
    11 Posts

    Re: Using DB2 to manage number of backups and logs

    ‏2014-03-20T14:14:27Z  

    Yes it does.  I think the documentation is fairly clear about this, that as long as you're using LOGARCHMETH1=TSM it will behave the way I think you're expecting, but let me know if it's not clear.

    http://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.admin.config.doc/doc/r0051456.html

    I'm back with a followup to my original question.

    We plan to use a backup strategy as follows
     Sat - full online bkup, Sun - Tu Incremental,  Wed - full online, Th-Fri Incremental

    If  the following is set
    REC_HIS_RETENTN=7, and NUM_DB_BACKUPS= 2

    My interpretation of what happens is that only the current 2 full backups are retain and 1 week of history file data is retained. When a new week for the backup cycle begins on Saturday, it will delete the backup image from the previous Saturday and the history files that are older than one week. What I don't understand, and the documentation is vague, is what happens to the incremental images taken between Sat and Weds, and  Weds and Sat. backups.  When will they be deleted? 

  • BE28_Larryk_Karl
    BE28_Larryk_Karl
    11 Posts

    Re: Using DB2 to manage number of backups and logs

    ‏2014-03-20T14:15:40Z  

    Yes it does.  I think the documentation is fairly clear about this, that as long as you're using LOGARCHMETH1=TSM it will behave the way I think you're expecting, but let me know if it's not clear.

    http://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.admin.config.doc/doc/r0051456.html

    I'm back with a followup to my original question.

    We plan to use a backup strategy as follows
     Sat - full online bkup, Sun - Tu Incremental,  Wed - full online, Th-Fri Incremental

    If  the following is set
    REC_HIS_RETENTN=7, and NUM_DB_BACKUPS= 2

    My interpretation of what happens is that only the current 2 full backups are retain and 1 week of history file data is retained. When a new week for the backup cycle begins on Saturday, it will delete the backup image from the previous Saturday and the history files that are older than one week. What I don't understand, and the documentation is vague, is what happens to the incremental images taken between Sat and Weds, and  Weds and Sat. backups.  When will they be deleted? 

  • BE28_Larryk_Karl
    BE28_Larryk_Karl
    11 Posts

    Re: Using DB2 to manage number of backups and logs

    ‏2014-03-20T14:19:21Z  

    Yes it does.  I think the documentation is fairly clear about this, that as long as you're using LOGARCHMETH1=TSM it will behave the way I think you're expecting, but let me know if it's not clear.

    http://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.admin.config.doc/doc/r0051456.html

    I'm back with a followup to my original question.

    We plan to use a backup strategy as follows
     Sat - full online bkup, Sun - Tu Incremental,  Wed - full online, Th-Fri Incremental

    If  the following is set
    REC_HIS_RETENTN=7, and NUM_DB_BACKUPS= 2


    My interpretation of what happens is that only the current 2 full backups are retain and 1 week of history file data is retained. When a new week for the backup cycle begins on Saturday, it will delete the backup image from the previous Saturday and the history files that are older than one week. What I don't understand, and the documentation is vague, is what happens to the incremental images taken between Sat and Weds, and  Weds and Sat. backups.  When will they be deleted? 

  • BE28_Larryk_Karl
    BE28_Larryk_Karl
    11 Posts

    Re: Using DB2 to manage number of backups and logs

    ‏2014-03-20T14:19:56Z  

    Yes it does.  I think the documentation is fairly clear about this, that as long as you're using LOGARCHMETH1=TSM it will behave the way I think you're expecting, but let me know if it's not clear.

    http://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.admin.config.doc/doc/r0051456.html

    I'm back with a followup to my original question.

    We plan to use a backup strategy as follows
     Sat - full online bkup, Sun - Tu Incremental,  Wed - full online, Th-Fri Incremental

    If  the following is set
    REC_HIS_RETENTN=7, and NUM_DB_BACKUPS= 2


    My interpretation of what happens is that only the current 2 full backups are retain and 1 week of history file data is retained. When a new week for the backup cycle begins on Saturday, it will delete the backup image from the previous Saturday and the history files that are older than one week. What I don't understand, and the documentation is vague, is what happens to the incremental images taken between Sat and Weds, and  Weds and Sat. backups.  When will they be deleted? 

  • BE28_Larryk_Karl
    BE28_Larryk_Karl
    11 Posts

    Re: Using DB2 to manage number of backups and logs

    ‏2014-03-20T14:21:14Z  

    Yes it does.  I think the documentation is fairly clear about this, that as long as you're using LOGARCHMETH1=TSM it will behave the way I think you're expecting, but let me know if it's not clear.

    http://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.admin.config.doc/doc/r0051456.html

    I'm back with a followup to my original question.

    We plan to use a backup strategy as follows
     Sat - full online bkup, Sun - Tu Incremental,  Wed - full online, Th-Fri Incremental

    If  the following is set
    REC_HIS_RETENTN=7, and NUM_DB_BACKUPS= 2


    My interpretation of what happens is that only the current 2 full backups are retain and 1 week of history file data is retained. When a new week for the backup cycle begins on Saturday, it will delete the backup image from the previous Saturday and the history files that are older than one week. What I don't understand, and the documentation is vague, is what happens to the incremental images taken between Sat and Weds, and  Weds and Sat. backups.  When will they be deleted? 

  • BE28_Larryk_Karl
    BE28_Larryk_Karl
    11 Posts

    Re: Using DB2 to manage number of backups and logs

    ‏2014-03-20T14:22:29Z  

    Yes it does.  I think the documentation is fairly clear about this, that as long as you're using LOGARCHMETH1=TSM it will behave the way I think you're expecting, but let me know if it's not clear.

    http://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.admin.config.doc/doc/r0051456.html

    I'm back with a followup to my original question.

    We plan to use a backup strategy as follows
     Sat - full online bkup, Sun - Tu Incremental,  Wed - full online, Th-Fri Incremental

    If  the following is set
    REC_HIS_RETENTN=7, and NUM_DB_BACKUPS= 2


    My interpretation of what happens is that only the current 2 full backups are retain and 1 week of history file data is retained. When a new week for the backup cycle begins on Saturday, it will delete the backup image from the previous Saturday and the history files that are older than one week. What I don't understand, and the documentation is vague, is what happens to the incremental images taken between Sat and Weds, and  Weds and Sat. backups.  When will they be deleted? 

  • Kelly Rodger
    Kelly Rodger
    8 Posts

    Re: Using DB2 to manage number of backups and logs

    ‏2014-03-20T14:40:12Z  

    I'm back with a followup to my original question.

    We plan to use a backup strategy as follows
     Sat - full online bkup, Sun - Tu Incremental,  Wed - full online, Th-Fri Incremental

    If  the following is set
    REC_HIS_RETENTN=7, and NUM_DB_BACKUPS= 2


    My interpretation of what happens is that only the current 2 full backups are retain and 1 week of history file data is retained. When a new week for the backup cycle begins on Saturday, it will delete the backup image from the previous Saturday and the history files that are older than one week. What I don't understand, and the documentation is vague, is what happens to the incremental images taken between Sat and Weds, and  Weds and Sat. backups.  When will they be deleted? 

    When AUTO_DEL_REC_OBJ is enabled, with those NUM_DB_BACKUPS and REC_HIS_RETENTN settings, the rule is that a non-incremental, database will be expired if it is older than BOTH parameters.  Once you have more than 2 such backups (non-incremental, database images), those images outside the retention period can be purged.  Incremental and delta images do not count towards NUM_DB_BACKUPS.

    Any incremental backup images which are based on an image that's being expired, are also expired.

    Log archives older than the retention period can also be expired, except for any log archives needed for the recovery of any image that's being retained, are also always retained.

    Hope that helps

  • BE28_Larryk_Karl
    BE28_Larryk_Karl
    11 Posts

    Re: Using DB2 to manage number of backups and logs

    ‏2014-03-20T15:03:53Z  

    Yes it does.  I think the documentation is fairly clear about this, that as long as you're using LOGARCHMETH1=TSM it will behave the way I think you're expecting, but let me know if it's not clear.

    http://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.admin.config.doc/doc/r0051456.html

    I'm back with a followup to my original question.

    We plan to use a backup strategy as follows
     Sat - full online bkup, Sun - Tu Incremental,  Wed - full online, Th-Fri Incremental

    If  the following is set
    REC_HIS_RETENTN=7, and NUM_DB_BACKUPS= 2


    My interpretation of what happens is that only the current 2 full backups are retain and 1 week of history file data is retained. When a new week for the backup cycle begins on Saturday, it will delete the backup image from the previous Saturday and the history files that are older than one week. What I don't understand, and the documentation is vague, is what happens to the incremental images taken between Sat and Weds, and  Weds and Sat. backups.  When will they be deleted? 

  • BE28_Larryk_Karl
    BE28_Larryk_Karl
    11 Posts

    Re: Using DB2 to manage number of backups and logs

    ‏2014-03-20T15:35:59Z  

    Yes it does.  I think the documentation is fairly clear about this, that as long as you're using LOGARCHMETH1=TSM it will behave the way I think you're expecting, but let me know if it's not clear.

    http://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.admin.config.doc/doc/r0051456.html

    I'm back with a followup to my original question.

    We plan to use a backup strategy as follows
     Sat - full online bkup, Sun - Tu Incremental,  Wed - full online, Th-Fri Incremental

    If  the following is set
    REC_HIS_RETENTN=7, and NUM_DB_BACKUPS= 2


    My interpretation of what happens is that only the current 2 full backups are retain and 1 week of history file data is retained. When a new week for the backup cycle begins on Saturday, it will delete the backup image from the previous Saturday and the history files that are older than one week. What I don't understand, and the documentation is vague, is what happens to the incremental images taken between Sat and Weds, and  Weds and Sat. backups.  When will they be deleted? 

  • BE28_Larryk_Karl
    BE28_Larryk_Karl
    11 Posts

    Re: Using DB2 to manage number of backups and logs

    ‏2014-03-20T15:36:37Z  

    Yes it does.  I think the documentation is fairly clear about this, that as long as you're using LOGARCHMETH1=TSM it will behave the way I think you're expecting, but let me know if it's not clear.

    http://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.admin.config.doc/doc/r0051456.html

    I'm back with a followup to my original question.

    We plan to use a backup strategy as follows
     Sat - full online bkup, Sun - Tu Incremental,  Wed - full online, Th-Fri Incremental

    If  the following is set
    REC_HIS_RETENTN=7, and NUM_DB_BACKUPS= 2


    My interpretation of what happens is that only the current 2 full backups are retain and 1 week of history file data is retained. When a new week for the backup cycle begins on Saturday, it will delete the backup image from the previous Saturday and the history files that are older than one week. What I don't understand, and the documentation is vague, is what happens to the incremental images taken between Sat and Weds, and  Weds and Sat. backups.  When will they be deleted?