0

After a full backup on an Oracle 12.1 database with retention policy set to 1 and ARCHIVELOG DELETION POLICY BACKED UP 2 TIMES TO DISK, if a run delete obsolete device type disk, all archivelogs are gone even if those are not backed up twice on disk. Why? I'm missing something? Backup script commands:

backup database plus archivelog;
crosscheck backup;
delete obsolete device type disk;
delete expired backup device type disk;

Rman settings, out of that, all are default.

RETENTION POLICY TO REDUNDANCY 1;
ARCHIVELOG DELETION POLICY BACKED UP 2 TIMES TO DISK;

1 Answer 1

0

From the documentation, explanation of the OBSOLETE option of the DELETE command:

Deletes data file backups and copies recorded in the RMAN repository that are obsolete, that is, no longer needed (see Example 2-78). RMAN also deletes obsolete archived redo log files and log backups.

RMAN determines which backups and copies of data files are no longer needed, which in turn determines when logs (and backups of logs) are no longer needed. RMAN considers the creation of a data file as a backup when deciding which logs to keep.

RMAN first uses the options specified with obsOperandList to determine which files are obsolete. If you do not specify options in obsOperandList, then RMAN uses the options specified in CONFIGURE RETENTION POLICY.

Note: DELETE OBSOLETE considers only the backup retention policy and does not use the configured archived log deletion policy to determine which logs are obsolete. In contrast, DELETE ARCHIVELOG ALL considers only the configured archived log deletion policy.

See that last "Note"?

8
  • BTW, Oracle 12 is getting seriously out of date, out of support. Well past time to upgrade.
    – EdStevens
    Sep 22, 2021 at 17:07
  • I guess I skipped that part, my bad, so it is logically that archivelogs to be deleted. Now the question is, how can I delete previous backup, without delete archivelogs? I just want to keep archivelogs for more days, but to delete previous backup.
    – scH
    Sep 23, 2021 at 6:53
  • Why do you want to keep archivelogs if they are no longer needed to enforce your recovery window?
    – EdStevens
    Sep 23, 2021 at 14:30
  • Because I olso have a tape backup which runs Tuesday, and disk backup runs Saturday, if I need the backup and I found disk backup corrupted I want to be able to restore database from tape and to be up to date.
    – scH
    Sep 23, 2021 at 15:02
  • What is your recovery window definition (rman show retention policy)? How often are you running rman backups, and what type? I think you need to update your opening post to show your backup script(s), and the result of 'rman show all'. It appears that your real requirements are at odds with your current practice.
    – EdStevens
    Sep 23, 2021 at 17:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.