Restore From Backup
Restore the data from the database backup of your source database to your target database.
Install Oracle Database Backup on the Target Database
Copy the oci_install.jar
file over to the target database
host and run the command to install Oracle Database Backup on the target.
Configure the Backup Storage on the Target Database
Configure the backup SBT_TAPE storage device on the target database.
Set the DBID and Restore the SPF File From Backup
Run RMAN commands to set the DBID and the decryption password to restore the SPF file from backup. When setting the DBID, you'll use RMAN to replace the target DBID with the source DBID.
Create a Directory for the Audit File
Create a destination directory for the audit file.
The default location is /u01/app/oracle/admin/$ORACLE_SID/adump
.
You can see the setting used by the original database by searching the restored
spfile
for the string audit_file_dest
.
The spfile
is a binary file, requiring strings to parse properly.
However, line breaks may be present that prevent a simple grep from providing the
full path. The -s ""
option on strings removes line breaks and the
sed
command parses out the text after
audit_file_dest
. Because the sed
command
does not handle non-greedy regex, the awk
command is needed to
trim the end of the file.