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 > Backup Archive/Delete

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-10-06, 15:08
mdx34 mdx34 is offline
Registered User
 
Join Date: Oct 2004
Posts: 238
Backup Archive/Delete

Redhat Linux: DB2 V 8.2

Is there an option on the DB2 maintenance wizard (I have not seen it) to keep certain day worth of database backup files or I have to create a script to delete files older than some days ? What is the best approach ? Is there any script to delete file out there ?

Thanks.
Reply With Quote
  #2 (permalink)  
Old 10-10-06, 16:44
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
We use a cron script to delete them. We have been doing this way for years and it works fine.

Andy
Reply With Quote
  #3 (permalink)  
Old 10-11-06, 09:25
mdx34 mdx34 is offline
Registered User
 
Join Date: Oct 2004
Posts: 238
Can you post a sample script ?

Thanks.
Reply With Quote
  #4 (permalink)  
Old 10-11-06, 09:43
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
The crontab for the instance owner looks like this:

# DB2's Crontab
################################################## ##################
#M H Day M Day
#I R of T of Command
#N S Mth H Week
################################################## ##################
#Backup of the LCAD_ATL Database
00 22 * * * /scripts/backup_LCAD_ATL.sh


The script the crontab shows looks like:

. /lcad_logs/db2inst1/sqllib/db2profile
db2 -tvf /lcad/onlinebu_LCAD_ATL.ddl


The file: /lcad/onlinebu_LCAD_ATL.ddl contains an online backup command for the database. Yours may vary.

Andy
Reply With Quote
  #5 (permalink)  
Old 10-11-06, 09:59
mdx34 mdx34 is offline
Registered User
 
Join Date: Oct 2004
Posts: 238
Thanks.................
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