9 Replies Latest reply: Oct 16, 2013 4:02 AM by Jimbo RSS

    Query on RMAN Retention Policy

    Jimbo


      Hi, I have my Retention policy set to Redundancy 2

       

      I have taken 3 backups so far ( 2 Backup Sets, 1 Image Copy )

       

      When I check report obsolete I get the following

       

      RMAN retention policy will be applied to the command

      RMAN retention policy is set to redundancy 2

      Report of obsolete backups and copies

      Type                 Key    Completion Time    Filename/Handle

      -------------------- ------ ------------------ --------------------

      Backup Set           1      05-SEP-13

        Backup Piece       1      05-SEP-13          /home/app/oracle/fast_recovery_area/PRIMARYP/backupset/2013_09_05/o1_mf_annnn_TAG20130905T100934_92jllgn1_.bkp

      Backup Set           2      05-SEP-13

        Backup Piece       2      05-SEP-13          /home/app/oracle/fast_recovery_area/PRIMARYP/backupset/2013_09_05/o1_mf_nnndf_TAG20130905T100949_92jllycp_.bkp

      Backup Set           3      05-SEP-13

        Backup Piece       3      05-SEP-13          /home/app/oracle/fast_recovery_area/PRIMARYP/backupset/2013_09_05/o1_mf_ncsnf_TAG20130905T100949_92jln4d5_.bkp

      Backup Set           4      05-SEP-13

        Backup Piece       4      05-SEP-13          /home/app/oracle/fast_recovery_area/PRIMARYP/backupset/2013_09_05/o1_mf_annnn_TAG20130905T101030_92jln6cx_.bkp

      Backup Set           5      27-SEP-13

        Backup Piece       5      27-SEP-13          /home/app/oracle/fast_recovery_area/PRIMARYP/backupset/2013_09_27/o1_mf_annnn_TAG20130927T120734_94bsqrj6_.bkp

      Backup Set           7      27-SEP-13

        Backup Piece       7      27-SEP-13          /home/app/oracle/fast_recovery_area/PRIMARYP/backupset/2013_09_27/o1_mf_ncsnf_TAG20130927T120751_94bssf0j_.bkp

      Archive Log          305    10-OCT-13          /home/app/oracle/fast_recovery_area/PRIMARYP/archivelog/2013_10_10/o1_mf_1_138_95dv9okt_.arc

      Archive Log          306    10-OCT-13          /home/app/oracle/fast_recovery_area/PRIMARYP/archivelog/2013_10_10/o1_mf_1_139_95dv9px0_.arc

      Archive Log          307    10-OCT-13          /home/app/oracle/fast_recovery_area/PRIMARYP/archivelog/2013_10_10/o1_mf_1_140_95dv9r8f_.arc

      Archive Log          308    10-OCT-13          /home/app/oracle/fast_recovery_area/PRIMARYP/archivelog/2013_10_10/o1_mf_1_141_95dv9sk9_.arc

       

      Backup Set pieces 1,2,3,4 basically equate to my oldest backup - hence under redundancy of 2, I can see why that is obsolete

       

      5 and 7 were simply Control File/SPFILE backups from Auto Backup and the 2 newer backups of these have been taken since ( i.e. backupset pieces 9 and 10 )

       

      Q. What happens if I wanted to restore the database to the 27/09 ? What SPFILE and Control would it use ( presuming the OBSOLETE files had been removed out of the FRA ) ?

      Would I have to restore the removed backup set into the FRA, Cross Check and then restore the database via RMAN to the 27/09 ?

       

      Q. Why are some of today's ( 10/10/13 ) archive logs marked as OBSOLETE ?

       

      Q. If I wanted to have the ability to restore the database to 2 days ago, is perhaps a Rentention Policy of a 2 day Recovery Window perhaps better than my current Redundancy=2 policy ( combined with taking a daily backup ) ?

       

      any advice appreciated,

      Jim

        • 1. Re: Query on RMAN Retention Policy
          gottikere

          Q. What happens if I wanted to restore the database to the 27/09 ? What SPFILE and Control would it use ( presuming the OBSOLETE files had been removed out of the FRA ) ?

          Would I have to restore the removed backup set into the FRA, Cross Check and then restore the database via RMAN to the 27/09 ?

           

          - Yes you can get the database to the date which ever you want , using recover database until time.

           

          Q. Why are some of today's ( 10/10/13 ) archive logs marked as OBSOLETE ?


          - can you please provide the output of below command

          RMAN> show all;


          Q. If I wanted to have the ability to restore the database to 2 days ago, is perhaps a Rentention Policy of a 2 day Recovery Window perhaps better than my current Redundancy=2 policy ( combined with taking a daily backup ) ?


          - You can restore the database back  to two days or 5 days based on your requirement. You nee to recover the database using  until time option.


          Thanks,

          http://gssdba.wordpress.com

          • 2. Re: Query on RMAN Retention Policy
            Jimbo

            RMAN> show all;

            using target database control file instead of recovery catalog
            RMAN configuration parameters for database with db_unique_name PRIMARYP are:
            CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
            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 PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
            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 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
            CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
            CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/home/app/oracle/product/11.2.0/dbhome_primaryp/dbs/snapcf_PRIMARYP.f'; # default

            RMAN>

            • 3. Re: Query on RMAN Retention Policy
              gottikere

              are you seeing todays archive log when you issue below command:

               

              RMAN> report obsolete

               

              Thanks,

              http://gssdba.wordpress.com

              • 4. Re: Query on RMAN Retention Policy
                Hemant K Chitale

                BackupSets 1,4 and 5 are archivelogs.

                BackupSet 2 is datafiles.

                BackupSets 3 and 7 are  controlfile+spfile (autobackups).

                (Look at the backup piece names to identify their contents)

                So, it would seem that the database backup of 27-Sep is not obsolete yet (as of the time you generated the list).

                 

                To restore to 27-Sep Oracle could use the controlfile autobackup of 27-Sep or a controlfile backup that was created after 27-Sep.  If backupsets have been removed, you would manually restore them from tape and then CATALOG  (not "crosscheck") them.  Lookup the documentation on the CATALOG command.

                 

                A Retention Policy of 2 days recovery window is better than redundancy of 2.  The recovery window method allows you to run multiple (adhoc if necessary) backups on the same day without compromising your recoverability.

                 

                Why are some of today's archivelogs OBSOLETE ?  Did you run multiple database backups today ?  (archivelogs older than a database backup of satisfying the redundancy would be obsolete).

                 

                 

                Hemant K Chitale

                • 5. Re: Query on RMAN Retention Policy
                  Jimbo

                  So, it would seem that the database backup of 27-Sep is not obsolete yet (as of the time you generated the list) >>

                  The output I showed is from the RMAN> report obsolete;

                   

                  So how can it not be obsolete if it is showing up under this command ?

                  • 6. Re: Query on RMAN Retention Policy
                    Hemant K Chitale

                    For 27-Sep, your list shows Archivelog and Controlfile/SPFILE backups.  NOT the database backup.  The database backup of 27-Sep is NOT reported as obsoleted.

                     

                    Hemant K Chitale


                    • 7. Re: Query on RMAN Retention Policy
                      Jimbo

                      Hemant how were you able to tell that the backups were just Controlfile/SPFILE backups ( in particular backup pieces 1,2,3,4 ) ? Is it the naming convention ?

                      • 8. Re: Query on RMAN Retention Policy
                        Hemant K Chitale

                        Yes, from the names of the BackupPieces.

                         

                        A LIST BACKUP would show the contents of the BackupSets and BackupPieces.

                         

                        Hemant  K Chitale

                        • 9. Re: Query on RMAN Retention Policy
                          Jimbo

                          great thanks - where is the naming convention explained ?