##############################################################################
# README_cold_restore.txt
# README for the script to restore an FBIRN Oracle database hidprd instance 
# from a cold backup.
#
# Created 06/21/07 by Mark Scully at The MIND Institute in Albuquerque
#
##############################################################################

The cold_restore.pl script is used to restore from a cold backup taken 
using backupCOLD.sh.  If using the backup package provided by The MIND 
then backupCOLD.sh is run weekly with the results most likely stored under 
/nas/nas*/oracle_backups/hidprd/cold/*  This script can be used to restore
the backup on the machine it was taken, or on another machine that has
been setup correctly.

To use cold_restore.pl, simply put the hidprd_cold_backup_file.tar.gz file 
in the same directory as the script and call:

./cold_restore.pl hidrd_cold_backup_file.tar.gz

Alternately, extract the tar.gz file which should produce a directory like:

nas/nas0/oracle_backup/hirprd/cold/temp/

Then run cold_restore.pl with the extracted directory like so:

./cold_restore.pl nas/nas0/oracle_backup/hirprd/cold/temp/

If the directory structure required by hidprd does not exist, the script 
will prompt you to run "sudo mkdir_hidprd.sh" to create it.

If there is an instance of hidprd currently running on the machine you are 
trying to run cold_restore.pl on, the script will exit and tell you to 
shutdown the dtaabase first.

If any of the hidprd files already exist, the script will ask you whether 
you want to overwrite them.  BEWARE!  This is permanent.  If you choose to 
overwrite, whatever database that currently exists will be replaced with 
the database in the cold backup.  Use at your own risk!.

This script can not be used to restore the database with a different 
oracle_sid, such as during some types of migration.

After the script is run, start the database.
$ sqlplus "/ as sysdba"
SQL> startup
SQL> exit;

Then the network files listener.ora, tnsnames.ora, and sqlnet.ora must be 
updated in relation to the new database.  This can be done using the netca 
command.
				   
You will also need to update the .bash_profile in 

/dbms/oracle/v01/app/oracle/. 

This can be done by referencing a known good .bash_profile.

This is currently a known issue involving trying to restore a 9.2.0 compatible
database taken on a 10g machine on a 10g machine.  If this is done, the database assumes an upgrade is occurring so further steps are needed.
