Restore to a different disk using RMAN

In this example scenario...

In this example scenario:

RMAN making backups into the /oracle/rman/ directory, at the same time backups were being copied onto a different machine on the network.

The disk with the /oracle/rman/ directory has failed, making the backups unavailable. Backups were then copied to /oracle/rman1/.

 

At the same time:

The “oratr” disk /oracle/oradata/oratr/ which contains the redologs, controlfiles and datafiles has also failed. A new disk is installed and mounted on the yenioratr directory /oracle/oradata/yenioratr.

 

This is illustrated here:

Restore to a different disk using RMAN

Step 1: Delete dbf, redo logs and control files in order to implement the scenario.

 

Step 2: As part of the scenario, backups that were made to the /oracle/rman folder using rman need to be moved to another disk/folder (making a copy of the directory on the network).

By restoring the backups to a different location we can now recover the database.

Step 3: Restoring the controlfile to a new location.

Had the restore been to the first location, i.e. if /oracle/oradata/oratr/ was in a good condition the following command could have been used:

Note: The new control file paths need to be written to pfile.ora in order to re-open the database with the updated spfile. RMAN would then need to be reconnected in mount mode.

Check the updated control file paths using the following query:

Step 4: The new backups need to be identified to RMAN because location where the backups are now stored in a different location.

Alternatively:

Step 5: Updating the control file with the redo log directories. (This step may need to be done after Step 6)

Step 6: Restore and recover the datafiles, start the server using open reset logs. (We use reset logs because there aren’t any redo logs)

Note: Use the following code in situations where the pfile, spfile or any other necessary files can’t be found: