Thursday 8 October 2015

How to Check/Validate That RMAN Backups Are Good

How to Check/Validate That RMAN Backups Are Good

I Want to restore and recover the database till time ‘9:00, 22-October-2012

Step 1: The below command just gives the report of backups that are used to do the  restore and recover :

RMAN> run
{
set until time "to_date('2015-20-07:9:00:00','yyyy-dd-mm:hh24:mi:ss')";
restore database preview;
}


Step 2: Then run the below command to check the backup pieces are good :

The below command will read the backup pieces/Copies which has datafiles and if finds any error it will report at the RMAN prompt.

RMAN> run
{
allocate channel c1 type disk;
set until time "to_date('2012-22-10:9:00:00','yyyy-dd-mm:hh24:mi:ss')";
restore database validate;
}


Step 3: Check the archivelogs needed for recovery

Replace the xxx, yyy with the start and end archivelog sequence reported by restore database preview command ran in the step 1.

RMAN> run
2> {
allocate channel c1 type disk;
restore archivelog from sequence 48301 until sequence 48317 validate;
}

No comments:

Post a Comment