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

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

  2. #2
    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.

  3. #3
    Join Date
    Oct 2004
    Posts
    268
    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.....

  4. #4
    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.

  5. #5
    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

  6. #6
    Join Date
    Oct 2004
    Posts
    268
    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 ?

  7. #7
    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

Posting Permissions

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