Restore Rman Backups On A Different Node When The Directory Are Diff_419137.1
In this Document
Goal |
Fix |
References |
This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review. |
Applies to:
Oracle Server - Enterprise Edition - Version 10.1.0.2 and laterInformation in this document applies to any platform.
***Checked for relevance on 16-Nov-2012***
Goal
Restoring Rman backup on a different node with different backup directory structures and different database directory structures .
++ The database has to be has to be restored from the Rman backup on NODE 2.
++ The directory structures for the backups and the database files are different on NODE 2.
++ The Rman backups have to put in new directory structure on NODE 2 unlike as they were on NODE 1.
++ Also the database has to be restored to a different directory structure on NODE 2.
Fix
ASSUMPTIONS
-----------------------
++ The database files on NODE 1 are in '/node1/database/prod'
++ The backups on NODE 2 will be in location '/node2/database/backup'
++ The database files on NODE 2 will be restored to '/node2/database/prod
Steps to acheive the goal:
1) Connect to the target database using rman and backup the database ---> ON NODE 1
Recovery Manager: Release 10.2.0.1.0 - Production on Tue Feb 13 00:29:33 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: ORA10G (DBID=3932056136)
RMAN> backup database plus archivelog;
Starting backup at 13-FEB-07
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=143 recid=109 stamp=614392105
channel ORA_DISK_1: starting piece 1 at 13-FEB-07
channel ORA_DISK_1: finished piece 1 at 13-FEB-07
piece handle=/node1/database/backup/o1_mf_annnn_TAG20070213T002825_2x21kbds
_.bkp tag=TAG20070213T002825 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 13-FEB-07
Starting backup at 13-FEB-07
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backupset
channel ORA_DISK_1: specifying datafile(s) in backupset
input datafile fno=00003 name=/node1/database/prod/sysaux01.dbf
input datafile fno=00001 name=/node1/database/prod/system01.dbf
input datafile fno=00002 name=/node1/database/prod/undotbs01.dbf
input datafile fno=00004 name=/node1/database/prod/users01.dbf
input datafile fno=00005 name=/node1/database/prod/1.dbf
input datafile fno=00006 name=/node1/database/prod/sysaux02.dbf
input datafile fno=00007 name=/node1/database/prod/undotbs02.dbf
channel ORA_DISK_1: starting piece 1 at 13-FEB-07
channel ORA_DISK_1: finished piece 1 at 13-FEB-07
piece handle=/node1/database/backup/o1_mf_nnndf_TAG20070213T002827_2x21kd12
_.bkp tag=TAG20070213T002827 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:55
Finished backup at 13-FEB-07
Starting backup at 13-FEB-07
current log archived
using channel ORA_DISK_1
channel ORA_DISK_1: starting archive log backupset
channel ORA_DISK_1: specifying archive log(s) in backup set
input archive log thread=1 sequence=144 recid=110 stamp=614392165
channel ORA_DISK_1: starting piece 1 at 13-FEB-07
channel ORA_DISK_1: finished piece 1 at 13-FEB-07
piece handle=/node1/database/backup/o1_mf_annnn_TAG20070213T002925_2x21m6ty
_.bkp tag=TAG20070213T002925 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
Finished backup at 13-FEB-07
Starting Control File and SPFILE Autobackup at 13-FEB-07
piece handle=/u01/oracle/product/ora10g/dbs/c-3932056136-20070213-02 comment=NONE
Finished Control File and SPFILE Autobackup at 13-FEB-07
RMAN> exit
2) Move the following files to the NODE 2:
+ Controlfile backup piece to the location '/node2/database/backup'
+ The parameter file i.e init.ora file to the default location i.e $ORACLE_HOME/dbs
3) Edit the PFILE on NODE 2 to change the environment specific parameters like .
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.
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=/node2/database/prod/control01.ctl
Finished restore at 13-FEB-07
6) Mount the database
7) Now catalog the backup pieces that were shipped from NODE 1
RMAN> catalog backuppiece '/node2/database/backup/o1_mf_annnn_TAG20070213T002825_2x21kbds_.bkp';
RMAN> catalog backuppiece '/node2/database/backup/o1_mf_nnndf_TAG20070213T002827_2x21kd12_.bkp';
8) Get to know the last sequence available in the archivelog backup using the following command.This will help us in recovering the database till that archivelog.
RMAN > list backup of archivelog all;
Let us assume the last sequence of last archivelog in the backup is 50.
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 '/node1/database/prod/redo01.log' to '/node2/database/prod/redo01.log'; ...... ...... ......
10) Now restore the datafiles to new locations and recover. Since we are recovering the database here till the archivelog sequence 50 the sequence number in the SET UNTIL SEQUENCE clause should be 50 (+1)
RMAN> run { set until sequence 51; set newname for datafile 1 to '/node2/database/prod/sys01.dbf'; set newname for datafile 2 to '/node2/database/prod/undotbs01.dbf'; set newname for datafile 3 to '/node2/database/prod/sysaux01.dbf'; set newname for datafile 4 to '/node2/database/prod/users01.dbf'; set newname for datafile 5 to '/node2/database/prod/1.dbf'; set newname for datafile 6 to '/node2/database/prod/sysaux02.dbf'; set newname for datafile 7 to '/node2/database/prod/undotbs02.dbf'; restore database; switch datafile all; recover database; alter database open resetlogs; }
The below article gives the information of various media manager Environment Variables.
NOTE.312737.1 RMAN and Specific Media Managers Environment Variables.
References
NOTE:228257.1 - RMAN 'Duplicate Database' Feature in Oracle9i / 10G and 11.1NOTE:73974.1 - RMAN: Restoring an RMAN Backup to Another Node
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-1063084/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Rman Backups When The Directory Structures Are DifferentStruct
- HowTo Restore RMAN Disk backups of RACREST
- HowTo Restore RMAN Disk backups of RAC Database to Single Instance On Another Node [ID 415579.1]RESTDatabase
- HowTo Restore RMAN Disk backups of RAC Database to Single Instance On Another NoRESTDatabase
- RMAN Fast Incremental BackupsASTREM
- Monitoring RMAN Backups
- Under the same directory(folder) copy or rename with the different extension name
- Making Whole Database Backups with RMANDatabase
- guarantee restore points-Flashback after RMAN restoreREST
- rman restore archivelog logRESTHive
- Using RMAN Incremental Backups to Refresh a Standby DatabaseREMDatabase
- 轉貼_RMAN-DBMS_BACKUP_RESTOREREST
- Using RMAN Incremental Backups to Roll Forward a Physical Standby DatabaseREMForwardDatabase
- Using RMAN REPORT NEED BACKUP with Different Retention Policies
- zt:Different type of RMAN backup compression in 11G
- rman restore database(spfile,controlfile, datafile)RESTDatabase
- oracle11gr1 RMAN bakcup and restoreOracleREST
- RMAN DUPLICATE/RESTORE/RECOVER 混合平臺支援REST
- ORA-19573&rman restore失敗REST
- NBU report error 6 when RMAN backupError
- RMAN : Consistent Backup, Restore and Recovery using RMAN (Doc ID 162855.1)REST
- How to restore and recover a database from an RMAN backup_881395.1RESTDatabase
- Oracle rman中recover和restore的區別:OracleREST
- rman備份驗證(之restore validate)REST
- Manually Backup - Restore or Clone a Database to Another Node [ID 562556.1]RESTDatabase
- RMAN跨平臺傳輸表空間(different Endian)
- RMAN restore validate database報ORA-19693RESTDatabase
- rman 還原歸檔日誌(restore archivelogRESTHive
- rman 還原歸檔日誌(restore archivelog)RESTHive
- 使用RMAN backup和restore方式部署物理備庫REST
- Can you create a second voting disk in a different ASM diskgroup when using External Redundancy in 1ASM
- RMAN-06100: no channel to restore a backup or copy of datafileREST
- RMAN Restore Performance from Tape is Very Poor (Doc ID 850988.1)RESTORM
- RMAN DUPLICATE/RESTORE/RECOVER Mixed Platform Support [ID 1079563.1]RESTPlatform
- ORA-1113, ORA-1110 When recovering a copy of the database on a different serverDatabaseServer
- Migrate to different Endian Platform Using TTS With RMAN-371556.1PlatformTTS
- RMAN-06023 no backup or copy of datafile 1 found to restoreREST
- oracle10g_rman_語法測試_restore專題OracleREST