3 Replies Latest reply: Nov 11, 2013 6:52 AM by EdStevens RSS

    RMAN backups does not match its retention policy

    John-MK

      Hello,

       

      I have couple of PROD instances on Windows environment with 11.2.0.3 DB version. RMAN retention policy is set to 14 days but I have noticed that backup is showing longer than that.

       

      For example: LIST BACKUP OF DATABASE whows backups since 13th October. I also checked backup pieces at netapp share and they are present.

       

      DELETE NOPROMPT OBSOLETE do not remove anything as expired backup.

       

      I have clear retention policy and set to 14 days again but does not seem to work.

       

      I would appreciate suggestion(s) regarding the strange issue.

       

      Thanks a lot.

       

      Best Regards

        • 1. Re: RMAN backups does not match its retention policy
          EdStevens

          John-MK wrote:

           

          Hello,

           

          I have couple of PROD instances on Windows environment with 11.2.0.3 DB version. RMAN retention policy is set to 14 days but I have noticed that backup is showing longer than that.

           

          For example: LIST BACKUP OF DATABASE whows backups since 13th October. I also checked backup pieces at netapp share and they are present.

           

          DELETE NOPROMPT OBSOLETE do not remove anything as expired backup.

           

          I have clear retention policy and set to 14 days again but does not seem to work.

           

          I would appreciate suggestion(s) regarding the strange issue.

           

          Thanks a lot.

           

          Best Regards

           

          We would need to know what kind of backups and when they were taken.  Consider this scenario:

          retention policy of 7 days.

          Incremental level 0 backup taken on Sundays

          Incremental level 1 backups taken Mon through Sat.

          Let's say Oct 1 is a Sunday, so we take an inc-0 backup on Oct 1, and again on Oct 8.

          Now let's say we are at Oct 10.  Our 7 day retention policy dicatates that we be able to recover to any day back to Oct 3.

          The only way we can recover to Oct 3 is to begin with that inc-0 backup from Oct 1.

          All recovery begins with the last inc-0 backup prior to the point in time to be recovered.  In a normal, regularly cycling schedule of backups,  you will actually end up with backups 1 day short of being twice as old as your retention period.

           

          Let's take a more extreme example.  Same 7-day retention period, but after a single inc-0 backup, you don't take any more backups for 3 months.  That one single backup is still needed to enforce your recovery window, and so is not obsolete, despite the fact it is 3 months old and your recovery window is only 7 days.

           

          Also, you mention 'expired'.  In terms of oracle backups, 'expired' is not the same as 'obsolete'.

          "Obsolete" means 'no longer needed to enforce recovery policy'.

          "Expired" is a bit more complex.

          when a backup is taken, or an archivelog is written, a record of that is written to the repository.  when you do an rman 'crosscheck', those repository records are compared to reality -- to see if the recorded backup file or archivelog file actually exists.  Maybe someone used an OS command to delete them.  Any file found to have 'gone walkabout' have their repository records marked as 'expired'.  An rman 'delete expired' then removes those records from the repository.

          • 2. Re: RMAN backups does not match its retention policy
            John-MK

            Hi,

            Thanks a lot EdStevens for the nice explanations. I would assume that although having retention policy of 14 days, 23 days Level0 backup might needed for recovery as the next two Level0 backups got failed due to netapp share disk full.

             

            Best Regards

            • 3. Re: RMAN backups does not match its retention policy
              EdStevens

              John-MK wrote:

               

              Hi,

              Thanks a lot EdStevens for the nice explanations. I would assume that although having retention policy of 14 days, 23 days Level0 backup might needed for recovery as the next two Level0 backups got failed due to netapp share disk full.

               

              Best Regards

              If an attempt to take a backup failed -- for whatever reason -- then you don't have that backup.  So that non-existent backup cannot play a part in determining what is considered obsolete.