Tuesday, December 15, 2009

Backup and Clone 10G Oracle Home to Different Server or File System

Backup Oracle Home 10g


Considerations:

1. Database instances are shutdown

2. Listeners are stopped

3. DBConsole / Agent are stopped

4. All other database appliances are stopped.

Backup location:

Server: 10.235.21.XXX

Location : /u02/bin/ORACLE_HOME_BKP/PROD/

Step 1: go to $ORACLE_HOME directory (/u01/app/oracle/product/10.2.0)

% cd $ORACLE_HOME

Step 2: Run tar to run recursive backup of ORACLE_HOME directory

% tar cvf /u02/bin/ORACLE_HOME_BKP/PROD/oracle10ghome_0405.tar .

Restore or Clone Oracle Home 10g


Step 1 : Check the Inventory to see if the ORACLE_HOME was removed (verify the REMOVED=”T” option is added to the ‘HOME NAME’ tag)

% cd $ORACLE_BASE/oraInventory/ContentsXML

% grep "HOME NAME" *

inventory.xml:

Step 2: Create $ORACLE_HOME directory

% mkdir –p $ORACLE_HOME

Step 3: Copy tar backup file to $ORACLE_HOME

cp /u02/bin/ORACLE_HOME_BKP/PROD/oracle10ghome_05.tar $ORACLE_HOME/

Step 4: Unpack the tarball into to $ORACLE_HOME directory

% tar xvf oracle10ghome_05.tar


Step 5: check the contents of /etc/oraInst.loc

vi /etc/oraInst.loc

inventory_loc=/u01/app/oracle/oraInventory

inst_group=oinstall

Step 6: Reregister the ORACLE_HOME

cd $ORACLE_HOME/clone/bin

% perl clone.pl ORACLE_HOME=$ORACLE_HOME ORACLE_HOME_NAME="OraDb10g_home1"

Step 7: Run Root.sh as root

. /u01/app/oracle/product/10.2.0/root.sh





No comments:

Post a Comment