Directories Needed:
——————————
Source Server:
———————–
hostname=source.com
ORACLE_BASE=/opt/app/oracle
ORACLE_HOME=/opt/app/oracle/product/11.2.0.2
Staging Directory = /home/oracle/clone [This directory will be used as a staging directory for the binaries]
Target Server:
——————-
hostname=target.com
Create the following directories if required
————————————————————
ORACLE_BASE=/opt/app/oracle
ORACLE_HOME=/opt/app/oracle/product/11.2.0.2 [This should be empty]
Staging Directory= /home/oracle/clone
Procedure to Clone:
—————————-
Log on to the source server:
————————————–
ssh oracle@source.com
a) Choose the Version of the ORACLE_HOME you intend to clone and ‘cd’ to that directory. In our case it is 11.2.0.2 Home
cd /opt/app/oracle/product/11.2.0.2/
b) Create a tar ball of the source ORACLE_HOME in the staging directory /home/oracle/clone
tar -cvf /home/oracle/clone/source_11202.tar ./
c) Once a tar file is created scp the file on to the remote server target.com
scp /home/oracle/clone/source_11202.tar oracle@target.com:/home/oracle/clone/
d) After the copying is done, logon to the target server
ssh oracle@target.com
e) Go to the staging directory where you have copied the tar ball. In our case it is /home/oracle/clone on the target server
cd /home/oracle/clone
f) Make sure you have the ORACLE_HOME directory created on the target server. untar the tar file
i) cd /opt/app/oracle/product/11.2.0.2
ii) tar -xvf /home/oracle/clone/source_11202.tar
g) Once untar is done, run the runInstaller command in silent mode
/opt/app/oracle/product/11.2.0.2/oui/bin/runInstaller -silent -clone ORACLE_HOME=”/opt/app/oracle/product/11.2.0.2″ ORACLE_HOME_NAME=”ANY NAME” ORACLE_BASE=”/opt/app/oracle”
h)The above step takes a while, once the setup is successful switch to root user and run the following configuration script
/opt/app/oracle/product/11.2.0.2/root.sh