These steps will help you clone already patched home and avoid the new installation procedures in few minutes.
To do so you have to follow the below steps:
On the Source machine:
tar cvf /{full path for the tar file to be created including the file name} {files or folders to be archived "Oracle Grid Home"}
After the tar file created then gzip it as below:
gzip agent11.tar
-bash-3.2$ ls
10.2 agent10g.tar.gz agent11g stage
agent10g agent11.tar.gz oraInventory.tar.gz
-bash-3.2$ scp -rp agent11.tar.gz oracle@10.195.2.13:/app/portal/oracle/oracle
agent11.tar.gz 100% |************************************************************| 588 MB 00:51
On the destination machine:
set your desired time zone as below:
export TZ=Etc/GMT-2
Then install the home as below:
-bash-3.2$ ./runInstaller -clone -forceClone ORACLE_HOME=/app/portal/oracle/oracle/product/agent11g ORACLE_HOME_NAME=agent11g1 -silent b_chainedInstall=false oracle.sysman.top.agent:s_installType=AGENT OMS_HOST=csemp.bss.etisalat.eg OMS_PORT=4889 -local CLUSTER_NODES={portaldb3}
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 29258 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-03-23_02-54-56PM. Please wait ...-bash-3.2$ Oracle Universal Installer, Version 11.1.0.8.0 Production
Copyright (C) 1999, 2010, Oracle. All rights reserved.
You can find the log of this install session at:
/app/portal/oracle/oracle/oraInventory/logs/cloneActions2014-03-23_02-54-56PM.log
.................................................................................................... 100% Done.
Installation in progress (Sunday, March 23, 2014 2:55:06 PM EET)
...............................................................Install successful
Linking in progress (Sunday, March 23, 2014 2:55:13 PM EET)
. 64% Done.
Link successful
Setup in progress (Sunday, March 23, 2014 2:55:58 PM EET)
...................... 100% Done.
Setup successful
End of install phases.(Sunday, March 23, 2014 2:56:19 PM EET)
Starting to execute configuration assistants
Configuration assistant "Oracle Configuration Manager Clone" succeeded
Configuration assistant "Agent Configuration Assistant" succeeded
WARNING:
The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root script to run
/app/portal/oracle/oracle/product/agent11g/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
The cloning of agent11g1 was successful.
Please check '/app/portal/oracle/oracle/oraInventory/logs/cloneActions2014-03-23_02-54-56PM.log' for more details.
Configuring the agent:
-bash-3.2$ ./agentca -f -c "{portaldb3}"
Stopping the agent using /app/portal/oracle/oracle/product/agent11g/bin/emctl stop agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
Stopping agent ... stopped.
Running agentca using /app/portal/oracle/oracle/product/agent11g/oui/bin/runConfig.sh ORACLE_HOME=/app/portal/oracle/oracle/product/agent11g ACTION=Configure MODE=Perform RESPONSE_FILE=/app/portal/oracle/oracle/product/agent11g/response_file RERUN=TRUE INV_PTR_LOC=/app/portal/oracle/oracle/product/agent11g/oraInst.loc COMPONENT_XML={oracle.sysman.top.agent.10_2_0_1_0.xml}
Perform - mode is starting for action: Configure
Perform - mode finished for action: Configure
You can see the log file: /app/portal/oracle/oracle/product/agent11g/cfgtoollogs/oui/configActions2014-03-26_10-31-47-AM.log
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 29236 MB Passed
The inventory pointer is located at /app/portal/oracle/oracle/product/agent11g/oraInst.loc
The inventory is located at /app/portal/oracle/oracle/oraInventory
'UpdateNodeList' failed.
Starting the agent using /app/portal/oracle/oracle/product/agent11g/bin/emctl start agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
Starting agent ............................ started.
Stopping the agent using /app/portal/oracle/oracle/product/agent11g/bin/emctl stop agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
Stopping agent ... stopped.
Running Agent Addon Configuration using /app/portal/oracle/oracle/product/agent11g/perl/bin/perl /app/portal/oracle/oracle/product/agent11g/sysman/install/AddonConfig.pl
Arguments passed
Configuring Addon from xml : oracle.sysman.plugin.virtualization.agent.11_1_0_1_0.xml
Running Command : /app/portal/oracle/oracle/product/agent11g/oui/bin/runConfig.sh ORACLE_HOME=/app/portal/oracle/oracle/product/agent11g ACTION=configure MODE=perform RERUN=true RESPONSE_FILE=/app/portal/oracle/oracle/product/agent11g/vt_responsefile COMPONENT_XML={oracle.sysman.plugin.virtualization.agent.11_1_0_1_0.xml}
Setting the invPtrLoc to /app/portal/oracle/oracle/product/agent11g/oraInst.loc
perform - mode is starting for action: configure
perform - mode finished for action: configure
You can see the log file: /app/portal/oracle/oracle/product/agent11g/cfgtoollogs/oui/configActions2014-03-26_10-33-20-AM.log
Agent Addon Configuration done
Starting the agent using /app/portal/oracle/oracle/product/agent11g/bin/emctl start agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
Agent is already running
-bash-3.2$ ./agentca -f -c "{portaldb3}"
Stopping the agent using /app/portal/oracle/oracle/product/agent11g/bin/emctl stop agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
Stopping agent ... stopped.
Running agentca using /app/portal/oracle/oracle/product/agent11g/oui/bin/runConfig.sh ORACLE_HOME=/app/portal/oracle/oracle/product/agent11g ACTION=Configure MODE=Perform RESPONSE_FILE=/app/portal/oracle/oracle/product/agent11g/response_file RERUN=TRUE INV_PTR_LOC=/app/portal/oracle/oracle/product/agent11g/oraInst.loc COMPONENT_XML={oracle.sysman.top.agent.10_2_0_1_0.xml}
Perform - mode is starting for action: Configure
Perform - mode finished for action: Configure
You can see the log file: /app/portal/oracle/oracle/product/agent11g/cfgtoollogs/oui/configActions2014-03-26_10-31-47-AM.log
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 29236 MB Passed
The inventory pointer is located at /app/portal/oracle/oracle/product/agent11g/oraInst.loc
The inventory is located at /app/portal/oracle/oracle/oraInventory
'UpdateNodeList' failed.
Starting the agent using /app/portal/oracle/oracle/product/agent11g/bin/emctl start agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
Starting agent ............................ started.
Stopping the agent using /app/portal/oracle/oracle/product/agent11g/bin/emctl stop agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
Stopping agent ... stopped.
Running Agent Addon Configuration using /app/portal/oracle/oracle/product/agent11g/perl/bin/perl /app/portal/oracle/oracle/product/agent11g/sysman/install/AddonConfig.pl
Arguments passed
Configuring Addon from xml : oracle.sysman.plugin.virtualization.agent.11_1_0_1_0.xml
Running Command : /app/portal/oracle/oracle/product/agent11g/oui/bin/runConfig.sh ORACLE_HOME=/app/portal/oracle/oracle/product/agent11g ACTION=configure MODE=perform RERUN=true RESPONSE_FILE=/app/portal/oracle/oracle/product/agent11g/vt_responsefile COMPONENT_XML={oracle.sysman.plugin.virtualization.agent.11_1_0_1_0.xml}
Setting the invPtrLoc to /app/portal/oracle/oracle/product/agent11g/oraInst.loc
perform - mode is starting for action: configure
perform - mode finished for action: configure
You can see the log file: /app/portal/oracle/oracle/product/agent11g/cfgtoollogs/oui/configActions2014-03-26_10-33-20-AM.log
Agent Addon Configuration done
Starting the agent using /app/portal/oracle/oracle/product/agent11g/bin/emctl start agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
Agent is already running
Clustering the new agent nodes:
Then update the cluster node list by running the below command on all rac nodes to make the agent clustered:
/app/portal/oracle/oracle/product/agent11g/oui/bin/runInstaller ORACLE_HOME=/app/portal/oracle/oracle/product/agent11g -updateNodeList "CLUSTER_NODES={portaldb1,portaldb2,portaldb3,portaldb4}" -local
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 29257 MB Passed
The inventory pointer is located at /var/opt/oracle/oraInst.loc
The inventory is located at /app/portal/oracle/oracle/oraInventory
'UpdateNodeList' was successful.
In case you face issues and want to deattach and attach the home again:
To deattach Home:
runInstaller –silent -detachHome -invPrtLoc /app/portal/oracle/oracle/oraInventoryoraInst.loc \
ORACLE_HOME_NAME="agent11g1" \
ORACLE_HOME="/app/portal/oracle/oracle/product/agent11g"
To attach Home:
runInstaller –silent -attachHome -invPrtLoc /app/portal/oracle/oracle/oraInventoryoraInst.loc \
ORACLE_HOME_NAME="agent11g1" \
ORACLE_HOME="/app/portal/oracle/oracle/product/agent11g"
To Update the node list with clustered nodes:
/app/portal/oracle/oracle/product/agent11g/oui/bin/runInstaller ORACLE_HOME=/app/portal/oracle/oracle/product/agent11g -updateNodeList "CLUSTER_NODES={portaldb1,portaldb2,portaldb3,portaldb4}" -local
In case you face issues and want to deattach and attach the home again:
To deattach Home:
runInstaller –silent -detachHome -invPrtLoc /app/portal/oracle/oracle/oraInventoryoraInst.loc \
ORACLE_HOME_NAME="agent11g1" \
ORACLE_HOME="/app/portal/oracle/oracle/product/agent11g"
To attach Home:
runInstaller –silent -attachHome -invPrtLoc /app/portal/oracle/oracle/oraInventoryoraInst.loc \
ORACLE_HOME_NAME="agent11g1" \
ORACLE_HOME="/app/portal/oracle/oracle/product/agent11g"
To Update the node list with clustered nodes:
/app/portal/oracle/oracle/product/agent11g/oui/bin/runInstaller ORACLE_HOME=/app/portal/oracle/oracle/product/agent11g -updateNodeList "CLUSTER_NODES={portaldb1,portaldb2,portaldb3,portaldb4}" -local
References:
http://docs.oracle.com/cd/E17559_01/install.111/e16847/clone_agent_usng_zip.htm