How to restore RMAN backup to different server and Recover the database
The situation here is we have taken an RMAN backup on PROD (Source) and we need to restore those backup pieces on different server as TEST (target) database.
Its actually cloning the database from PROD(SOURCE) to TEST(target) using RMAN backup piecies taken on source.
Please follow the following steps outlined below.
Please note source (PROD) is where the backup piecies are available, we need to clone and create a database with another name TEST (target) on different server.
In target Database (TEST) perform the below
Modify the db_name in the $ORACLE_HOME/dbs/init.ora file to reflect the source database name Eg: PROD
Start database in nomount mode and restore controlfile (this controlfile should be the RMAN backup controlfile after the RMAN backup on source)
Copy the control file backup piece from source to target and restore the controlfile.
rman target /
RMAN>startup nomount;
RMAN>restore controlfile from '/u01/backup/ccf_c-1250176543-20081031-01';
--Mount the database
RMAN>alter database mount;
Copy all the backup piecies of source(PROD) database to target(TEST) server.
Copy all the backup piecies of source(PROD) database to target(TEST) server using scp.
Once copy completes,Run the following script to list the backup pieces available:
Register all the copied backup piecies in the controlfile. (/u01/backup is the location of copied backup piecies in the target)