8 Replies Latest reply on Feb 21, 2013 1:37 PM by JSebastian

    Using RMAN 11.2.0.3 with a Recovery Catalog Database

    JSebastian
      list backup of database; shows only 8 days worth of backups.
      I though that one of the advantages of using a Recovery Catalog database was that I'd have much larger amount of information on backups taken.
      How can I show backups that were taken longer than 8 days ago?

      Thanks,
        • 1. Re: Using RMAN 11.2.0.3 with a Recovery Catalog Database
          JSebastian
          Daily, I run a script against each database that executes the following commands:

          crosscheck backup of database;
          crosscheck backup of archivelog all;
          crosscheck backup of controlfile;
          delete expired backup;
          delete expired archivelog all;
          delete expired backup of controlfile;


          Originally we were not using a Recovery Catalog, just the Control File so I figured delete operation would be wise since I did not want the controlfile growing too large. I'm guessing that this is what's removing the record of the older backups. Am I not thinking correctly about this? Is there a way to keep history in the Recovery Catalog but not consume so much space in the Controlfile for the history?

          Sorry if these are simple questions. I'm not seeing answers to them in the Ref or UG manuals for RMAN
          • 2. Re: Using RMAN 11.2.0.3 with a Recovery Catalog Database
            Mihael
            If you remove backup or archive log, the record is removed from control file and from recovery catalog. When new backup or archivelog is added, a record also added to both repositories.
            But records in controlfile can expire according to CONTROL_FILE_RECORD_KEEP_TIME parameter. So new records can overwrite old ones even if backup or archive log is not obsoleted. Records in recovery catalog never expires.
            • 3. Re: Using RMAN 11.2.0.3 with a Recovery Catalog Database
              JSebastian
              Sorry for the dump question.

              When you say "If you remove backup or archive log" are you referring to physically deleting the backup save set off of disk or deleting the expired backup record after a crosscheck operation?

              If I understand you correctly, I should no longer be issuing the following three commands in my daily crosscheck script:

              delete expired backup;
              delete expired archivelog all;
              delete expired backup of controlfile;


              Without the above three delete statements, backup records will be kept indefinitely in the Recovery Catalog but will be overwritten in the controlfile based on the CONTROL_FILE_RECORD_KEEP_TIME parameter.

              Am I understanding this correctly?

              Thanks again.
              • 4. Re: Using RMAN 11.2.0.3 with a Recovery Catalog Database
                EdStevens
                JSebastian wrote:
                Sorry for the dump question.

                When you say "If you remove backup or archive log" are you referring to physically deleting the backup save set off of disk or deleting the expired backup record after a crosscheck operation?

                If I understand you correctly, I should no longer be issuing the following three commands in my daily crosscheck script:

                delete expired backup;
                delete expired archivelog all;
                delete expired backup of controlfile;


                Without the above three delete statements, backup records will be kept indefinitely in the Recovery Catalog but will be overwritten in the controlfile based on the CONTROL_FILE_RECORD_KEEP_TIME parameter.

                Am I understanding this correctly?

                Thanks again.
                You need to understand the difference between 'obsolete' and 'expired'.

                Whenever a backup is created or an archivelog is written, a record of the backupset or archivelog (including it's fully qualified file name -- full path and file name) is created in the control file.
                A 'crosscheck' goes through those records and checks to see if said backupset/archivelog is still where it belongs, or has gone for a walkabout.
                If said file has gone missing (like, say, you issued an OS command to delete it), the record is marked as 'expired'.
                An rman 'delete expired' command deletes these 'expired' records from the repository.

                An 'obsolete' backup is one that is no longer needed to protect the specified recovery window. Backups, and the repository records of those backups, are not marked as obsolete. The are evaluated in response to an rman command that deals with obsolescence -- DELETE OBSOLETE or REPORT OBSOLETE. An all recovery must start with a full or level 0 incremental backup. So your most recent level 0 will NEVER be obsolete, no matter how old it is or how short your recovery window is ... because it is still needed to protect that recovery window.
                • 5. Re: Using RMAN 11.2.0.3 with a Recovery Catalog Database
                  JSebastian
                  Yes I understand the difference between the two. What I'm trying to get at is having longer history available when I issue a list backup of ..... command from RMAN.
                  Right now, I'm only seeing 8 days worth of data although we have backup save sets on tape for far longer. My Federal agency was too cheap to buy a tape license for Oracle so I backup everything to disk. Since disk space is not an endless resource, I only keep several days worth of on-disk backup save sets. I use OS commands to remove them (and this is why I was crosschecking and deleting expired daily). But, those disk backups are on tape for up to 12 weeks. I want to have the ability to see what the backup save sets and other relevant information was weeks ago when the backups that are on tape were made. Moving to an RMAN Catalog database was the solution to this yet I'm finding that the data is not there. I'm guessing that no longer using a DELETE EXPIRTED ..... command in RMAN will do just that but I'm trying to verify that here.
                  • 6. Re: Using RMAN 11.2.0.3 with a Recovery Catalog Database
                    Hemant K Chitale
                    I use OS commands to remove them (and this is why I was crosschecking and deleting expired daily).
                    Once you DELETE EXPIRED, you tell Oracle to remove entries (i.e. "knowledge") about these backups. The delete is executed both against the control file and the catalog schema.


                    What you could try is to set a
                    a) CONFIGURE RETENTION POLICY TO RECOVERY WINDOW of n DAYS (where n is, for example, 30).
                    b) not CROSSCHECK BACKUP and DELETE EXPIRED BACKUP


                    That way, a LIST BACKUP would "show" backups upto n (30) days old even though they are no longer on disk.

                    Note that with your current strategy, Oracle is NOT aware of the backups that are copied to tape. It will always expect them to be on disk. You need to explicitly use tape commands to restore a backup from tape to disk before Oracle can use the RESTORE command against it.



                    If you DO run CROSSCHECK BACKUP and DELETE EXPIRED BACKUP, what you can do is to use tape commands to restore from tape to disk and then use CATALOG START WITH 'disklocation' to re-catalog the backups.

                    Hemant K Chitale

                    Edited by: Hemant K Chitale on Feb 21, 2013 9:48 AM
                    Added last paragraph "If you DO run ..."
                    • 7. Re: Using RMAN 11.2.0.3 with a Recovery Catalog Database
                      Mihael
                      When you say "If you remove backup or archive log" are you referring to physically deleting the backup save set off of disk or deleting the expired backup record after a crosscheck operation?
                      both cases:
                      1. rman "delete" command of existent file physically deletes file and sets status of record to 'Deleted'
                      2. delete by OS command, rman 'crosscheck' sets status of record to 'Expired' and 'delete expired' sets status of record to 'Deleted'

                      Deleted records will be overwriten in controlfile and in recovery catalog.
                      If I understand you correctly, I should no longer be issuing the following three commands in my daily crosscheck script:

                      delete expired backup;
                      delete expired archivelog all;
                      delete expired backup of controlfile;
                      They are needed if you delete backups and logs by OS commands.
                      But better approach is to set rman retention policy and use 'delete obsolete' command.
                      • 8. Re: Using RMAN 11.2.0.3 with a Recovery Catalog Database
                        JSebastian
                        Yes that is what our restore strategy has been for years. If I need an RMAN save set that is older than what is on disk, I have our SA restore it to disk and then I take over with the restore. Typically, we have only needed restores of export files, not RMAN files so this has not been an issue for us but as I've stated here, I'd like to have more history than what I was keeping in the control file now that I'm using an RMAN Catalog for RMAN backup records.