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 > DB2 - Delete old backups

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-18-07, 11:29
mdx34 mdx34 is offline
Registered User
 
Join Date: Oct 2004
Posts: 238
DB2 - Delete old backups

DB2 V 8.2 FP14.

Does DB2 has a component that will delete backup files older than some day(s) or you have to create a script and schedule and run it from crontab in Linux/AIX ?
Reply With Quote
  #2 (permalink)  
Old 12-18-07, 13:35
nivasreddy007 nivasreddy007 is offline
Registered User
 
Join Date: Jun 2007
Posts: 66
I think there is a way you can do that when you turn auto_maint ON and auto_db_backup on.You got to configure on control center.But without that,you got to write a shell script to automate the deletion of older(dated) backups.
Reply With Quote
  #3 (permalink)  
Old 12-18-07, 13:53
mdx34 mdx34 is offline
Registered User
 
Join Date: Oct 2004
Posts: 238
I don't see anything when I create a Automatic maintenence. I see a "Configure Settings" button but nothing under it about deleting old backups or maintain backups for X number of days. There is a NOTE that says "Backup images will be automatically pruned from this directory....................". I don't know how often this will be done or any way to modify it to my needs.....
Reply With Quote
  #4 (permalink)  
Old 12-18-07, 16:40
nivasreddy007 nivasreddy007 is offline
Registered User
 
Join Date: Jun 2007
Posts: 66
http://publib.boulder.ibm.com/infoce...e/c0008880.htm

If backup to disk is selected, the automatic backup feature will regularly delete backup images from the directory specified in the Configure Automatic Maintenance wizard. Only the most recent backup image is guaranteed to be available at any given time. It is recommended that this directory be kept exclusively for the automatic backup feature and not be used to store other backup images.


So, you are only guaranteed the last successful backup . I havent used this feature before and anyone here who tried this before please elaborate on this.
Reply With Quote
  #5 (permalink)  
Old 12-19-07, 01:29
rahul_s80 rahul_s80 is offline
Registered User
 
Join Date: Jul 2006
Location: Pune , India
Posts: 433
db2 9.5 have extra params in db2 cfg to handle most of these cases
__________________
Rahul Singh
Certified DB2 9 DBA / Application Developer
Reply With Quote
  #6 (permalink)  
Old 12-19-07, 11:31
mdx34 mdx34 is offline
Registered User
 
Join Date: Oct 2004
Posts: 238
Thanks..............I was asking this because what if I want to back sya 5 days and do a point time restore. I guess I can copy the backups to another area on a daily bases and do the restore. can't I ?
Reply With Quote
  #7 (permalink)  
Old 12-19-07, 17:33
nivasreddy007 nivasreddy007 is offline
Registered User
 
Join Date: Jun 2007
Posts: 66
Yeah you can do that..

V9.5 has a new db cfg parameter to delete older backups.If you set the new configuration parameter auto_del_rec_obj to ON, the database manager will also delete backup images, load copy images, and log files associated with any history file entries that it automatically prunes
__________________
www.db2commands.net
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