Deleting a backup

While no user interaction is required to delete a database-level backup, you can delete a schema-level backup manually.

Procedure

  • Database-level backup:

    Do not attempt to manually delete a database-level backup. Database-level backups are pruned automatically. By default, the retention period is set to 91 days, and only the latest 16 backups are retained. The remaining backups are pruned every 91 days.

  • Schema-level backup:
    1. Retrieve information about the backup that is to be deleted:
      db_backup -history
    2. Note the location (backup path) and timestamp of the backup.
    3. Remove the backup:
      rm -rf location/timestamp
    4. Delete the backup entry from the history:
      db2 "delete from IBM_SAILFISH.GRANULAR_BACKUP where TIMESTAMP = 'timestamp'"
    5. Make sure that backup history is updated:
      db_backup -history