Home » RDBMS Server » Backup & Recovery » RMAN RECOVERY FROM BACKUPSET IN DIFFERENT LOCATION FROM BACKUP LOCATION (ORACLE 10.2.0.3)
RMAN RECOVERY FROM BACKUPSET IN DIFFERENT LOCATION FROM BACKUP LOCATION [message #320012] Tue, 13 May 2008 12:55 Go to next message
hsorabh
Messages: 3
Registered: May 2008
Location: Gurgaon
Junior Member

HI ,

I AM FACING PROBLEM WITH MAKING CLONE DATABASE BY RMAN RECOVERY.
MY SCENIRIO IS I HAVE TAKEN RMAN BACKUP ON A SERVER IN /BACKUP/RMAN LOCATION AND COPY THE BACKUP SET TO B SERVER IN /BACKUP/RECOVER LOCATION AND WANT TO RECOVER THE DATABASE ON B SERVER BUT IT IS GIVING ERROR "ORA-19505 failed to identify file "

CAN YOU PLEASE LET ME KNOW THAT HOW CAN I RECOVER THE DATABASE IN DIFFERENT SERVER ON DIFFERENT DIRECOTRY FROM ACTUAL BACKUP LOCATION DIRECTORY.

REGARDS

SORABH HARIT
SR. DBA
Re: RMAN RECOVERY FROM BACKUPSET IN DIFFERENT LOCATION FROM BACKUP LOCATION [message #320051 is a reply to message #320012] Tue, 13 May 2008 20:03 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
The easiest is to create a named directory path as the target or you could CATALOG the backups.

Welcome to the forum, however please refrain from using CAPS in future post.

Re: RMAN RECOVERY FROM BACKUPSET IN DIFFERENT LOCATION FROM BACKUP LOCATION [message #320053 is a reply to message #320051] Tue, 13 May 2008 22:11 Go to previous messageGo to next message
hsorabh
Messages: 3
Registered: May 2008
Location: Gurgaon
Junior Member

Hi Sir,

Thansk for your reply,I have exp in RMAN and Book Also available with me..My question is that i do not want to recover the database from same directory where i took backup by rman.i want to copy that backup set to different dir location to other server and want to recover the database from different direcotory rather than actual backup location or any sym link.is it possible that i will copy the backup set in different dir not like actual even though i do not want to create same dir structure on another server.Like if i took backup on A dir and want to recover from B dir.Please let me know is it possible thru rman or not.

Regards

Sorabh
Re: RMAN RECOVERY FROM BACKUPSET IN DIFFERENT LOCATION FROM BACKUP LOCATION [message #320190 is a reply to message #320053] Wed, 14 May 2008 04:53 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Yes, check the CATALOG link provided above.
Re: RMAN RECOVERY FROM BACKUPSET IN DIFFERENT LOCATION FROM BACKUP LOCATION [message #320323 is a reply to message #320190] Wed, 14 May 2008 12:48 Go to previous messageGo to next message
hsorabh
Messages: 3
Registered: May 2008
Location: Gurgaon
Junior Member

Thanks for your support.I have done the job.docs.Once again thank and expecting same in future also for any problem.

Here is the solution

========================


Applies to:
Oracle Server - Enterprise Edition - Version: 10.2.0.0.0
Information in this document applies to any platform.

Goal
Restoring a database using rman on a different node with different backup directory structures and different database directory structures .

- You have a database backed up on NODE 1
- You need to restore the database on NODE 2
- The directory structure is different on NODE 2
- You need to put the backups in a new directory structure in NODE 2 unlike as they were in NODE 1
- You need to restore the database files into a new directory structure in NODE 2 unlike as they were in NODE 1
Solution
Below is the procedure with an example:

1) Connect to the target database using rman and backup the database ---> NODE 1








$ rman target /Recovery Manager: Release 10.2.0.1.0 - Production on Tue Feb 13 00:29:33
2007Copyright (c) 1982, 2005, Oracle. All rights reserved.connected to target database: ORA10G (DBID=3932056136)RMAN>
backup database plus archivelog;Starting backup at 13-FEB-07current log archivedusing channel ORA_DISK_1channel
ORA_DISK_1: starting archive log backupsetchannel ORA_DISK_1: specifying archive log(s) in backup setinput archive log thread=1
sequence=143 recid=109 stamp=614392105channel ORA_DISK_1: starting piece 1 at 13-FEB-07channel ORA_DISK_1: finished piece
1 at 13-FEB-07piece handle=/u01/oracle/product/oradata/ora10g/fra/ORA10G/backupset/2007_02_13/o1_mf_annnn_TAG20070213T002825_2x21kbds_.bkp
tag=TAG20070213T002825 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:02Finished backup at 13-FEB-07Starting
backup at 13-FEB-07using channel ORA_DISK_1channel ORA_DISK_1: starting full datafile backupsetchannel ORA_DISK_1: specifying
datafile(s) in backupsetinput datafile fno=00003 name=/u01/oracle/product/oradata/ora10g/data/sysaux01.dbfinput datafile
fno=00001 name=/u01/oracle/product/oradata/ora10g/data/system01.dbfinput datafile fno=00002 name=/u01/oracle/product/oradata/ora10g/data/undotbs01.dbfinput
datafile fno=00004 name=/u01/oracle/product/oradata/ora10g/data/users01.dbfinput datafile fno=00005 name=/home/oracle/1.dbfinput
datafile fno=00006 name=/u01/oracle/product/oradata/ora10g/data/sysaux02.dbfinput datafile fno=00007 name=/u01/oracle/product/oradata/ora10g/data/undotbs02.dbfchannel
ORA_DISK_1: starting piece 1 at 13-FEB-07channel ORA_DISK_1: finished piece 1 at 13-FEB-07piece handle=/u01/oracle/product/oradata/ora10g/fra/ORA10G/backupset/2007_02_13/o1_mf_nnndf_TAG20070213T002827_2x21kd12_.bkp
tag=TAG20070213T002827 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:55Finished backup at 13-FEB-07Starting
backup at 13-FEB-07current log archivedusing channel ORA_DISK_1channel ORA_DISK_1: starting archive log backupsetchannel
ORA_DISK_1: specifying archive log(s) in backup setinput archive log thread=1 sequence=144 recid=110 stamp=614392165channel
ORA_DISK_1: starting piece 1 at 13-FEB-07channel ORA_DISK_1: finished piece 1 at 13-FEB-07piece handle=/u01/oracle/product/oradata/ora10g/fra/ORA10G/backupset/2007_02_13/o1_mf_annnn_TAG20070213T002925_2x21m6ty_.bkp
tag=TAG20070213T002925 comment=NONEchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:02Finished backup at 13-FEB-07Starting
Control File and SPFILE Autobackup at 13-FEB-07piece handle=/u01/oracle/product/ora10g/dbs/c-3932056136-20070213-02 comment=NONEFinished Control File and SPFILE Autobackup at 13-FEB-07RMAN> exit











2) Move the following files to the NODE 2 :

+ The database backup pieces
+ Controlfile backup piece
+ The parameter file i.e init.ora file

3) Edit the PFILE on NODE 2 to change the environment specific parameters like .

user_dump_dest =
background_dump_dest =
control_files =
4) Once the PFILE is suitably modified invoke Rman on the NODE 2 after setting the Oracle environment variables and start the database in nomount mode:



[oracle@test-br test]$ export ORACLE_HOME=/u01/oracle/product/ora10g
[oracle@test-br test]$ export ORACLE_SID=ora10g
[oracle@test-br test]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@test-br test]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Tue Feb 13 00:36:55 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN> startup nomount
Oracle instance started
Total System Global Area 205520896 bytes
Fixed Size 1218508 bytes
Variable Size 75499572 bytes
Database Buffers 121634816 bytes
Redo Buffers 7168000 bytes



5) Restore the controlfile from the backup piece .



RMAN> restore controlfile from '/u01/oracle/product/ora10g/dbs/c-3932056136-20070213-02';
Starting restore at 13-FEB-07
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=155 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete,
elapsed time: 00:00:02
output filename=/u01/oracle/product/oradata/ora10g/cntrl/control01.ctl
Finished restore at 13-FEB-07


6) Mount the database


RMAN> alter database mount ;



7) Now catalog the backup pieces that were shipped from NODE 1



RMAN> catalog backuppiece '/home/oracle/test/backup/o1_mf_annnn_TAG20070213T002925_2x21m6ty_.bkp';Starting
implicit crosscheck backup at 13-FEB-07allocated channel: ORA_DISK_1channel ORA_DISK_1: sid=155 devtype=DISKCrosschecked
3 objectsFinished implicit crosscheck backup at 13-FEB-07Starting implicit crosscheck copy at 13-FEB-07using channel
ORA_DISK_1Finished implicit crosscheck copy at 13-FEB-07searching for all files in the recovery areacataloging files...no
files catalogedcataloged backuppiecebackup piece handle=/home/oracle/test/backup/o1_mf_annnn_TAG20070213T002925_2x21m6ty_.bkp
recid=41 stamp=614393265RMAN> catalog backuppiece '/home/oracle/test/backup/o1_mf_annnn_TAG20070213T002825_2x21kbds_.bkp';cataloged
backuppiecebackup piece handle=/home/oracle/test/backup/o1_mf_annnn_TAG20070213T002825_2x21kbds_.bkp recid=42 stamp=614393292RMAN>
catalog backuppiece '/home/oracle/test/backup/o1_mf_nnndf_TAG20070213T002827_2x21kd12_.bkp';cataloged backuppiecebackup
piece handle=/home/oracle/test/backup/o1_mf_nnndf_TAG20070213T002827_2x21kd12_.bkp recid=43 stamp=614393310



Cool Get to know the last sequence available in the archivelog backup using the following command


RMAN > list backup of archivelog all;



9) Rename the Redologfiles,so that they can be created in new locations when opened the database is opened in resetlogs


SQL> alter database rename file '/u01/oracle/product/oradata/ora10g/log/redo01.log' to '/home/oracle/test/log/redo01.log';..................



10) Now restore the datafiles to new locations and recover



RMAN> run { set until sequence <seq_no> set newname for datafile 1 to '/home/oracle/test/data/sys01.dbf';
set newname for datafile 2 to '/home/oracle/test/data/undotbs01.dbf'; set newname for datafile 3 to '/home/oracle/test/data/sysaux01.dbf';
set newname for datafile 4 to '/home/oracle/test/data/users01.dbf'; set newname for datafile 5 to '/home/oracle/test/data/1.dbf';
set newname for datafile 6 to '/home/oracle/test/data/sysaux02.dbf'; set newname for datafile 7 to '/home/oracle/test/data/undotbs02.dbf';
restore database; switch datafile all; recover database; alter database open resetlogs; }


============================================


Thanks & Regards

Sorabh Harit
Re: RMAN RECOVERY FROM BACKUPSET IN DIFFERENT LOCATION FROM BACKUP LOCATION [message #320324 is a reply to message #320323] Wed, 14 May 2008 12:54 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Glad it helped.

For future posts, please use [code][/code] tags.

[Updated on: Wed, 14 May 2008 12:54]

Report message to a moderator

Re: RMAN RECOVERY FROM BACKUPSET IN DIFFERENT LOCATION FROM BACKUP LOCATION [message #320694 is a reply to message #320324] Thu, 15 May 2008 23:14 Go to previous messageGo to next message
adie_rk79
Messages: 1
Registered: May 2008
Location: indonesia
Junior Member

can we do the same thing rman recovery from backupset in different location when we do duplicate database primary for standby
FYI , my primary is RAC with ASM storage.. and standby is sigle node with asm... i need to duplicate for standby, but i have to split the backup piece due to lack of disk space, does any one knows abt it?

rgrd
adie
Re: RMAN RECOVERY FROM BACKUPSET IN DIFFERENT LOCATION FROM BACKUP LOCATION [message #320695 is a reply to message #320694] Thu, 15 May 2008 23:35 Go to previous message
Frank
Messages: 7901
Registered: March 2000
Senior Member
Reported message
Reported By: adie_rk79 On: Fri, 16 May 2008 06:29
Reason: hi, i really need to knows wether we can do catalog backup piece "/loc...".., when we do standby duplication from primary... i need to create duplication for standby of my RAC primary database but i run out of disk space on standby and have to split the backup piece thanks adie DBA

Don't report messages to get attention. The reporting functionality is meant for abusive posts.

[Updated on: Thu, 15 May 2008 23:36]

Report message to a moderator

Previous Topic: Rman scripts location
Next Topic: lockfile too old error -- rman archive backup with netbackup
Goto Forum:
  


Current Time: Sat May 11 14:53:31 CDT 2024