This discussion is archived
1 2 Previous Next 16 Replies Latest reply: Apr 23, 2013 10:36 AM by ngilbert RSS

RMAN 11g Archivelog Backups not going obsolete

ngilbert Newbie
Currently Being Moderated
Still relatively new to RMAN, sorry if this is very basic.

We have EM (Cloud 12c) initiated scheduled backup jobs that perform (all below are online backups, obviously archivelog mode)
- level 0 Incremental 3AM on Sunday - with options backup all archive logs, delete input, delete obsolete
- level 1 Incremental (non cumulative) 3AM every other day - same options

Recovery window is set to 3 days, other options below:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 3 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK BACKUP TYPE TO COMPRESSED BACKUPSET PARALLELISM 2;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'MEDIUM' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD FALSE;
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO 'SBT_TAPE';
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_TELMRPT.f'; # default

Everything appears to be working normally (archive logs are being backed up and once they are the archive logs themselves are being deleted from the FRA), but I'm having some trouble understanding the behavior of the delete obsolete.

With a recovery window of 3 days, on Monday at 11AM my expectation would be that I would find in backups the following:
- level 0s from day before (Sunday) and the previous Sunday (8 days prior)
- all level 1s from previous Sunday on (so Mon-Sat and this morning)
- archivelog backups from Friday until this morning

What I'm not understanding is that I'm seeing archivelog backups from last Monday, Tuesday, etc. - i would have thought these would have gone obsolete based on my recovery window, yet when I run report obsolete in RMAN nothing is showing up.

Is there a configuration setting I've messed up or maybe I'm just not clear on how RMAN marks items obsolete.

Thanks

Edited by: ngilbert on Mar 11, 2013 1:30 PM

Edited by: ngilbert on Mar 11, 2013 1:31 PM
  • 1. Re: RMAN 11g Archivelog Backups not going obsolete
    mseberg Guru
    Currently Being Moderated
    Hello;

    Take a look at this and see if it helps

    http://www.visi.com/~mseberg/rman/obsolete_backups.html

    As you can see a level 1 changes the count because a level 1 is worthless without its base level 0 backup.

    What's not clear from your configure is if you backup to disk or tape.

    Best Regards

    mseberg

    Edited by: mseberg on Mar 11, 2013 3:41 PM
  • 2. Re: RMAN 11g Archivelog Backups not going obsolete
    ngilbert Newbie
    Currently Being Moderated
    Hi mseberg - thanks - I think I understand the level 0s and 1s ok, I just don't understand why I would need archivelog backups for the prior Monday Tuesday, etc. as they are outside the recovery window (I need the incrementals for those days to get me to my 3 day window, but why would I need the archivelog backups for days outside the window)?

    Using the typical Sunday level 0, other days level 1, (F=level 0, I=level 1 non cumulative, A=archive backups) where I am on day 9, I would expect the below to be retained (note no As for days 1-5)
    1 2 3 4 5 6 7 8 9
    F I I I I I+A I+A F+A I+A

    Instead I have archive backups for all days (1-9)

    Edited by: ngilbert on Mar 11, 2013 1:55 PM
  • 3. Re: RMAN 11g Archivelog Backups not going obsolete
    ngilbert Newbie
    Currently Being Moderated
    Sorry, also we only back up to disk - since we're doing delete input when we back up archive logs does this setting (CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO 'SBT_TAPE';) have any effect?
  • 4. Re: RMAN 11g Archivelog Backups not going obsolete
    mseberg Guru
    Currently Being Moderated
    Hello again;

    If that how much archive you want to keep then yes change to :

    configure archivelog deletion policy to backed up 1 times to disk;

    Best Regards

    mseberg
  • 5. Re: RMAN 11g Archivelog Backups not going obsolete
    ngilbert Newbie
    Currently Being Moderated
    Just to be clear - the archive logs themselves are already being automatically deleted when we do backups becuase of the DELETE INPUT clause.

    My question is regarding the archive log backups themselves.
  • 6. Re: RMAN 11g Archivelog Backups not going obsolete
    mseberg Guru
    Currently Being Moderated
    OK. I believe I understand.

    The archive log deletion policy which you configured using deletes the archive logs from disk that were backed up 1 time to disk.

    It doesn't mean deleting the archive log backup sets.

    The backup sets are defined in the retention policy.

    Have a great evening.

    Best Regards

    mseberg
  • 7. Re: RMAN 11g Archivelog Backups not going obsolete
    ngilbert Newbie
    Currently Being Moderated
    Hi mseberg - right - but that's what I'm curious about. I am not curious about the actual archive log deletion, I am only concerned with archive log backups.

    My recovery window is 3 days.

    I take a level 0 on Sunday and level 1 on every other day. With each backup I also back up archive logs and delete the archive logs.

    Today is Monday - based on my recovery window why do I need archive log backups from 6 days ago? If I don't, shouldn't they be obsolete?
  • 8. Re: RMAN 11g Archivelog Backups not going obsolete
    mseberg Guru
    Currently Being Moderated
    Not sure why this is not working.

    Please consider reading "Recovery Window" in "Database Backup and Recovery User's Guide E10642-05" Chapter 8

    http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmcncpt.htm

    There's two really good examples there.

    I really must walk my dog.

    Best Regards

    mseberg
  • 9. Re: RMAN 11g Archivelog Backups not going obsolete
    ngilbert Newbie
    Currently Being Moderated
    Maybe it would help if I rephrase the question.

    Given a Sunday level 0 and every other day level 1 (all backups at 3AM), if today is Friday and I want to recover to Thursday at noon do I need archive logs from Sun-Wed? Or just Sunday level 0, Mon-Thur level 1, and Thur archive log backups. I believe the latter (based on running restore preview), so I should not need the archive logs/log backups from Sun-Wed.

    If this is true, and my recovery window is only 1 day (and today is still Friday and I still want to recover to Thursday at noon) then I should not need archive/archive backups from Sun-Wed as they are outside my recovery window and therefor obsolete?

    If my question is unclear please help me to clarify
  • 10. Re: RMAN 11g Archivelog Backups not going obsolete
    mseberg Guru
    Currently Being Moderated
    Having some fun now!
    Thursday at noon do I need archive logs from Sun-Wed? Or just Sunday level 0, Mon-Thur level 1, and Thur archive log backups.
    So Sunday is the base backup. So the Monday and Tuesday backups are the changed blocks since then. Don't need archive yet. Wednesday you do another Incremental so from this point on for a Thursday noon recovery you need archive. RMAN, is generally a warm backup so you need archive to make your inconsistent backup work. So you need the base backup, all three incremental backups, and archive starting from the point just before that third incremental backup up to noon on Thursday.

    ( I don't like the change to daylight saving time ! )

    Best Regards

    mseberg
  • 11. Re: RMAN 11g Archivelog Backups not going obsolete
    Hemant K Chitale Oracle ACE
    Currently Being Moderated
    Do you happen to have a KEEP clause in any of your backups ?


    Hemant K Chitale
  • 12. Re: RMAN 11g Archivelog Backups not going obsolete
    ngilbert Newbie
    Currently Being Moderated
    Hi mseberg - thanks for responding - what you say above is what I believed as well. The part that's confusing me is that (using the same example we've been talking about, and assuming a 1 day recovery window) RMAN is nto marking the Mon-Wed archive log backups as obsolete when as you say they are not needed to satisfy the 1 day recovery window. That's actaully the only part I'm having problems with - just trying to determine whether its another setting on my side that prevents these from being considered obsolete or whether that's just how RMAN works...
  • 13. Re: RMAN 11g Archivelog Backups not going obsolete
    ngilbert Newbie
    Currently Being Moderated
    Hi Hemant - we are not using a KEEP clause on our backups - can you confirm that with a Sunday 0 and daily level 1s and a recovery window of n days, RMAN should mark as obsolete any archive log backups older than n days even if it needs to maintain incremental level 1s older than n days in order to satisfy the recovery window?

    Ie if we have a recovery window of 1 day and backup as below
    Sunday: level 0 plus archivelog delete input
    Monday: level 1 plus archivelog delete input
    Tuesday: level 1 plus archivelog delete input
    Wednesday: level 1 plus archivelog delete input
    Thursday: level 1 plus archivelog delete input
    Friday: level 1 plus archivelog delete input

    If today is Friday, should RMAN obsolete the archivelog backups from Sun - Wed? (while leaving the level 0, level 1s from Mon-Fri, and archivelog backups from Thur-Fri as active)?

    We are initiating the backups using EM, showing the generated RMAN script below:

    Our Sunday backup:
    backup incremental level 0 cumulative device type disk tag '%TAG' database;
    backup device type disk tag '%TAG' archivelog all not backed up delete all input;
    run {
    allocate channel oem_backup_disk1 type disk maxpiecesize 1000 G;
    backup tag '%TAG' current controlfile;
    release channel oem_backup_disk1;
    }

    Our daily (not Sunday) backup:
    backup incremental level 1 device type disk tag '%TAG' database;
    backup device type disk tag '%TAG' archivelog all not backed up delete all input;
    allocate channel for maintenance type disk;
    delete noprompt obsolete device type disk;
    release channel;

    Edited by: ngilbert on Mar 12, 2013 8:25 AM
  • 14. Re: RMAN 11g Archivelog Backups not going obsolete
    Hemant K Chitale Oracle ACE
    Currently Being Moderated
    In theory, since you do have the L1 backups, it seems that the older archivelogs are not required.

    It seems as if Oracle is tracking the archivelogs with respect to the L0 backup.

    Have you logged an SR with Oracle support ?



    Hemant K Chitale
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points