Oracle RMAN – Restore from any Disk Location
Oracle RMAN – Restore from any Disk Location
RMAN looks for the backupfiles to restore within its catalog and therefore there is no RESTORE DATABASE FROM <Disk-Location> command. You can circumvent this constraint using the RMAN command CATALOG START WITH <Disk-Location>. The following example shows how to restore an Oracle database from any disk location.
1. Copy the Backup Set Files to any Disk Location
cp <backupset> /tmp/backup
2. Mount the Database
sqlplus / as sysdba
startup mount;3. Cleanup RMAN Catalog
rman target /
crosscheck backup;
delete noprompt expired backup of database;
delete noprompt expired backup of controlfile;
delete noprompt expired backup of archivelog all;
list backup;At this point no backup should be available !
4. Make new Backup Location visible to RMAN Catalog
catalog start with ‘/tmp/backup’;
searching for all files that match the pattern
/tmp/backupList of Files Unknown to the Database
=====================================
File Name: /tmp/backup/PROD_datafile_14_1.bak
File Name: /tmp/backup/PROD_controlfile_17.bak
File Name: /tmp/backup/PROD_archivelog_16_1.bak
File Name: /tmp/backup/PROD_datafile_15_1.bakDo you really want to catalog the above files
(enter YES or NO)? yesList of Cataloged Files
=======================
File Name: /tmp/backup/PROD_datafile_14_1.bak
File Name: /tmp/backup/PROD_controlfile_17.bak
File Name: /tmp/backup/PROD_archivelog_16_1.bak
File Name: /tmp/backup/PROD_datafile_15_1.baklist backup;
At this point the backup must be available !
5. Restore and Recover the Database
restore database;
recover database;
alter database open;