Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2004
    Posts
    268

    Unanswered: 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.

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    We use a cron script to delete them. We have been doing this way for years and it works fine.

    Andy

  3. #3
    Join Date
    Oct 2004
    Posts
    268
    Can you post a sample script ?

    Thanks.

  4. #4
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    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

  5. #5
    Join Date
    Oct 2004
    Posts
    268
    Thanks.................

Posting Permissions

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