This discussion is archived
12 Replies Latest reply: Aug 1, 2013 6:36 PM by Hemant K Chitale RSS

How to validate RMAN backup..

user12115 Newbie
Currently Being Moderated

Hi All,

 

I have one question regarding how to validate RMAN backup. I have oracle environment 11.2.0.3.0 and I have received backup from our customer. Backup is big around 600GB and to restore that backup it will take time. But before start restoring if I want to know that received backup copy/backup piece are okay and not corrupted then how to check this ? do I need to run validate backupset or crosscheck backup or any other command needs to be run. Please guide me here.

 

 

Thanks in advance..

  • 1. Re: How to validate RMAN backup..
    StefanKoehler Explorer
    Currently Being Moderated

    Hi,

    > do I need to run validate backupset or crosscheck backup or any other command needs to be run?

    What kind of backup did you receive (image file copies or backup sets and with or without AUTOBACKUP)? Do you already have the same database (DBID / DBNAME, etc.) running on your site and just received a new backup? I really don't get it why it so hard to provide all the necessary information here. In nearly every thread only 20% or so are provided to answer the question.

     

    It seems like you have no idea what RMAN CROSSCHECK is doing, right?

     

    > Please guide me here.

    First guide us to your problem with all the needed information - then we can guide you.

     

    Regards

    Stefan

  • 3. Re: How to validate RMAN backup..
    JohnWatson Guru
    Currently Being Moderated

    user12115 wrote:

     

    Hi All,

     

    I have one question regarding how to validate RMAN backup. I have oracle environment 11.2.0.3.0 and I have received backup from our customer. Backup is big around 600GB and to restore that backup it will take time. But before start restoring if I want to know that received backup copy/backup piece are okay and not corrupted then how to check this ? do I need to run validate backupset or crosscheck backup or any other command needs to be run. Please guide me here.

     

     

    Thanks in advance..

    Before you can validate the backup or crosscheck, you need to mount the database. So you must restore at least the controlfile as a first step. But I wouldn't bother: doing the full restore and recover may not take that much longer than validating. You probably need to follow the routine called (if I remember correctly) "duplicating a database from a backup without a target or catalog connection".

    --

    John Watson

    Oracle Certifiedd Master DBA

    http://skillbuilders.com

  • 4. Re: How to validate RMAN backup..
    Mark D Powell Guru
    Currently Being Moderated

    I think this is a link to what John is talking about:

    DUPLICATE

     

    There is a blurb on the technique near the beginning and example code in the example section.

     

    HTH -- Mark D Powell --

  • 5. Re: How to validate RMAN backup..
    user12115 Newbie
    Currently Being Moderated

    Hi Stefan,

     

    Let me provide all information which I have...

     

    What kind of backup I received - Full backup in backupsets ,

    Already have the same database name - Yes, I wants to restore on the same DB name and I received a new backup.

     

    I run crosscheck command to get the idea about backupset/backup piece information.

     

    thanks...

  • 6. Re: How to validate RMAN backup..
    Hemant K Chitale Oracle ACE
    Currently Being Moderated

    >What kind of backup I received - Full backup in backupsets

     

    Validate if you have received the ArchiveLogs required for the RECOVER phase.

     

    Hemant K Chitale

  • 7. Re: How to validate RMAN backup..
    user12115 Newbie
    Currently Being Moderated

    Yes Hemant - I have received Archivelogs and its required to recover DB.  now question is how to validate received backup? Do you mean needs to run validate command ?

  • 8. Re: How to validate RMAN backup..
    Hemant K Chitale Oracle ACE
    Currently Being Moderated

    You can use the RESTORE DATABASE VALIDATE  and RESTORE ARCHIVELOG ALL VALIDATE commands .

    Note that "archivelog all" will attempt to verify that all archivelogs that are registered in the control file are restorable -- some of them, which are older than the database backup, may not have been included in the backup sent to you.  So, if you know which archivelogs are required, you  could RESTORE ARCHIVELOG FROM SEQUENCE# m   UNTIL SEQUENCE# n   to see if they are restorable.

     

    These commands can only be issued after you restore the controlfile which would have information about the database and archivelog backups. We are assuming that the controlfile backup was created after the database and archivelog backup. If the controlfile backup was created before the database and / archivelogs (which backuppieces you have received), then it would not be able to validate the backups as it would not have information about the backups !

     

     

    See Example 3-26 at http://docs.oracle.com/cd/E11882_01/backup.112/e10643/rcmsynta2008.htm#CHDHIEJA

     

     

    Hemant K Chitale

  • 9. Re: How to validate RMAN backup..
    user12115 Newbie
    Currently Being Moderated

    Hi Hemant,

     

    Thanks for your suggestion.  can I use clause "set until time (date with time)" ? Please guide.

     

    Thanks again...

  • 10. Re: How to validate RMAN backup..
    EdStevens Guru
    Currently Being Moderated

    user12115 wrote:

     

    Hi Stefan,

     

    Let me provide all information which I have...

     

    What kind of backup I received - Full backup in backupsets ,

    Already have the same database name - Yes, I wants to restore on the same DB name and I received a new backup.

     

    I run crosscheck command to get the idea about backupset/backup piece information.

     

    thanks...

    Please read the documentation here CROSSCHECK

    to learn what CROSSCHECK does.  It is not what you seem to think.

    Whenever a backupset is create, a record of that is written to the control file.  CROSSCHECK merely checks those records against reality and if any backupset has gone missing (say, someone deleted it with an OS command) the record in the control file is marked as 'expired'.  Follow that up with a DELETE EXPIRED and the records that have been marked as 'expired' are deleted from the control file.

     

    Nothing to do with validating the backup.

  • 11. Re: How to validate RMAN backup..
    user12115 Newbie
    Currently Being Moderated

    Hi Hemant,

     

    I try to validate the backup using "RESTORE DATABASE VALIDATE" but it failed with below error:

    RMAN-12009: command aborted because some backup pieces could not be located

    RMAN-12017: could not locate pieces of backup set key 126966

     

    Can you guide me here what is cause for above error..

     

    Thanks...

  • 12. Re: How to validate RMAN backup..
    Hemant K Chitale Oracle ACE
    Currently Being Moderated

    >could not locate pieces of backup set key 126966

     

    A "LIST BACKUP"  in the rman command line should show what datafiles Oracle needs from that backupset.

     

    RESTORE DATABASE VALIDATE does check to see if you have all backup pieces of database backup (one or more backupsets) to be able to do a Full Restore of the database.  (The command doesn't validate if you have all the Archivelogs for the RECOVER DATABASE phase, so you need to validate them separately).

     

     

    Hemant K Chitale

Legend

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