Restore full backup of another machine on a new machine
1. Remember the directory structure and DBID of the original machine.
2. Create the corresponding directory structure on the new machine and pay attention to the user permissions.
/U01/oracle/admin/dbname/pfile bdump udump dpdump cdump
/Oradata/dbname/rman_backup flash_recover_sea archivelog
3. Place the backup set file in the original Backup Directory of the new machine.
3. Connect Rman to the default location.
] $ Export ORACLE_SID = surgesms
] $./Rman target/
Connected to target database (not started)
3 startup nomount start default spfile
RMAN> startup nomount;
Startup failure: ORA-01078: failure in processing system parameters
LRM-00109: cocould not open parameter file '/u01/oracle/product/10.2.0/dbs/initsurgesms. ora'
Starting Oracle instance without parameter file for retrival of spfile
Oracle instance started
Total System Global Area 159383552 bytes
Fixed Size 1218244 bytes
Variable Size 58722620 bytes
Database Buffers 92274688 bytes
Redo Buffers 7168000 bytes
4. Restore the spfile and Control File
RMAN> set dbid 4223770157;
RMAN> restore spfile from '/oradata/{DB_NAME}/rman_backup/full. bak ';
RMAN> restore controlfile from '/oradata/{DB_NAME}/rman_backup/full. bak ';
5. Exit RMAN and re-import RMAN.
RMAN> shutdown
RMAN> EXIT
Bin] $./rman target/
RMAN> startup mount
6. Check whether the control file is used.
RMAN> show all;
Using target database control file instead of recovery catalog
RMAN configuration parameters are:
Configure retention policy to redundancy 1; # default
Configure backup optimization on;
Configure default device type to disk; # default
Configure controlfile autobackup off; # default
Configure controlfile autobackup format for device type disk to '% F'; # default
Configure device type disk parallelism 1 backup type to backupset; # default
Configure datafile backup copies for device type disk to 1; # default
Configure archivelog backup copies for device type disk to 1; # default
Configure channel device type disk format'/oradata/{DB_NAME}/rman_backup/full _ % d _ % s _ % T _ % t. bak ';
Configure maxsetsize to unlimited; # default
Configure encryption for database off; # default
Configure encryption algorithm 'aes128 '; # default
Configure archivelog deletion policy to none; # default
Configure snapshot controlfile name to '/u01/oracle/product/10.2.0/dbs/snapcf _ {DB_NAME}. F'; # default
7. Restore the database
RMAN> restore database;
8. Restore the database
RMAN> recover database
9 open the database
Alter database openResetlog