Just some notes on 12c Oracle Home Cloning.
I am too lazy to put step by step instructions in words, and if you have questions, please ask.
-defaultHomeName
<HOME NAME=”OraHome1” LOC=”/u01/app/oracle/product/12.2.0/dbhome_2″ TYPE=”O” IDX=”3″/>
oracle@arrow:hawlkas:/home/oracle
$ . oraenv <<< db12c
ORACLE_SID = [hawlkas] ? The Oracle base remains unchanged with value /u01/app/oracle
oracle@arrow:db12c:/home/oracle
$ echo $ORACLE_HOME
/u01/app/oracle/product/12.2.0/dbhome_1
oracle@arrow:db12c:/home/oracle
$ cd $ORACLE_HOME
oracle@arrow:db12c:/u01/app/oracle/product/12.2.0/dbhome_1
$ pwd
/u01/app/oracle/product/12.2.0/dbhome_1
oracle@arrow:db12c:/u01/app/oracle/product/12.2.0/dbhome_1
$ nohup tar -cvpf /tmp/db12cHome_${USER}_`hostname -s`_clone.tar . > /tmp/clone_${USER}_`hostname -s`_db12cHome.log 2>&1 &
[1] 13092
++++++++++
oracle@arrow:db12c:/u01/app/oracle/product/12.2.0/dbhome_1
$
[1]+ Done nohup tar -cvpf /tmp/db12cHome_${USER}_`hostname -s`_clone.tar . > /tmp/clone_${USER}_`hostname -s`_db12cHome.log 2>&1
oracle@arrow:db12c:/u01/app/oracle/product/12.2.0/dbhome_1
$ ll /tmp/*clone*
-rw-r--r--. 1 oracle oinstall 1381582 Mar 6 16:24 /tmp/clone_oracle_arrow_db12cHome.log
-rw-r--r--. 1 oracle oinstall 6581944320 Mar 6 16:24 /tmp/db12cHome_oracle_arrow_clone.tar
oracle@arrow:db12c:/u01/app/oracle/product/12.2.0/dbhome_1
$ tail /tmp/clone_oracle_arrow_db12cHome.log
./jdk/bin/xjc
./jdk/bin/javadoc
./jdk/bin/jarsigner
./jdk/bin/pack200
./jdk/bin/rmid
./jdk/bin/jrunscript
./jdk/bin/extcheck
./jdk/bin/keytool
./jdk/LICENSE
./jdk/.manifest
oracle@arrow:db12c:/u01/app/oracle/product/12.2.0/dbhome_1
$ du -sh /tmp/db12cHome_oracle_arrow_clone.tar
6.2G /tmp/db12cHome_oracle_arrow_clone.tar
oracle@arrow:db12c:/u01/app/oracle/product/12.2.0/dbhome_1
$
++++++++++
oracle@arrow:test12c:/home/oracle
$ . oraenv <<< test12c
ORACLE_SID = [test12c] ? The Oracle base remains unchanged with value /u01/app/oracle
oracle@arrow:test12c:/home/oracle
$ cd $ORACLE_HOME
oracle@arrow:test12c:/u01/app/oracle/product/12.2.0/dbhome_2
$ pwd
/u01/app/oracle/product/12.2.0/dbhome_2
oracle@arrow:test12c:/u01/app/oracle/product/12.2.0/dbhome_2
$ ls
oracle@arrow:test12c:/u01/app/oracle/product/12.2.0/dbhome_2
$ nohup tar -xvf /tmp/db12cHome_oracle_arrow_clone.tar > /tmp/untar_${USER}_`hostname -s`_db12cHome.log 2>&1 &
[1] 13182
oracle@arrow:test12c:/u01/app/oracle/product/12.2.0/dbhome_2
$
[1]+ Done nohup tar -xvf /tmp/db12cHome_oracle_arrow_clone.tar > /tmp/untar_${USER}_`hostname -s`_db12cHome.log 2>&1
oracle@arrow:test12c:/u01/app/oracle/product/12.2.0/dbhome_2
$ ll /tmp/untar_oracle_arrow_db12cHome.log
-rw-r--r--. 1 oracle oinstall 1381582 Mar 6 16:44 /tmp/untar_oracle_arrow_db12cHome.log
oracle@arrow:test12c:/u01/app/oracle/product/12.2.0/dbhome_2
$ tail /tmp/untar_oracle_arrow_db12cHome.log
./jdk/bin/xjc
./jdk/bin/javadoc
./jdk/bin/jarsigner
./jdk/bin/pack200
./jdk/bin/rmid
./jdk/bin/jrunscript
./jdk/bin/extcheck
./jdk/bin/keytool
./jdk/LICENSE
./jdk/.manifest
oracle@arrow:test12c:/u01/app/oracle/product/12.2.0/dbhome_2
$ ls
addnode ccr crs dbs diagnostics hs javavm ldap mgw odbc oracore owm precomp rdbms scheduler sqlpatch sysman wwg
apex cdata css dc_ocm dmu install jdbc lib network olap oraInst.loc perl QOpatch relnotes slax sqlplus ucp xdk
assistants cfgtoollogs ctx deinstall dv instantclient jdk log nls OPatch ord plsql R rest sqldeveloper srvm usm
bin clone cv demo has inventory jlib md
++++++++++
$ cd $ORACLE_HOME/clone/bin
oracle@arrow:test12c:/u01/app/oracle/product/12.2.0/dbhome_2/clone/bin
$ perl clone.pl -silent -noconfig -defaultHomeName ORACLE_HOME="/u01/app/oracle/product/12.2.0/dbhome_2" ORACLE_BASE="/u01/app/oracle" OSDBA_GROUP=dba OSOPER_GROUP=dba
./runInstaller -clone -waitForCompletion -noconfig -defaultHomeName "ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_2"
"ORACLE_BASE=/u01/app/oracle" "oracle_install_OSDBA=dba" "oracle_install_OSOPER=dba"
-silent -paramFile /u01/app/oracle/product/12.2.0/dbhome_2/clone/clone_oraparam.ini
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 500 MB. Actual 16049 MB Passed
Checking swap space: must be greater than 500 MB. Actual 3994 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2016-03-06_04-58-03PM.
Please wait ...You can find the log of this install session at:
/u01/app/oraInventory/logs/cloneActions2016-03-06_04-58-03PM.log
.................................................. 5% Done.
.................................................. 10% Done.
.................................................. 15% Done.
.................................................. 20% Done.
.................................................. 25% Done.
.................................................. 30% Done.
.................................................. 35% Done.
.................................................. 40% Done.
.................................................. 45% Done.
.................................................. 50% Done.
.................................................. 55% Done.
.................................................. 60% Done.
.................................................. 65% Done.
.................................................. 70% Done.
.................................................. 75% Done.
.................................................. 80% Done.
.................................................. 85% Done.
..........
Copy files in progress.
Copy files successful.
Link binaries in progress.
Link binaries successful.
Setup files in progress.
Setup files successful.
Setup Inventory in progress.
Setup Inventory successful.
Finish Setup successful.
The cloning of OraHome1 was successful.
Please check '/u01/app/oraInventory/logs/cloneActions2016-03-06_04-58-03PM.log' for more details.
Setup Oracle Base in progress.
Setup Oracle Base successful.
.................................................. 95% Done.
As a root user, execute the following script(s):
1. /u01/app/oracle/product/12.2.0/dbhome_2/root.sh
.................................................. 100% Done.
oracle@arrow:test12c:/u01/app/oracle/product/12.2.0/dbhome_2/clone/bin
$ su -
Password:
[root@arrow ~]# /u01/app/oracle/product/12.2.0/dbhome_2/root.sh
Check /u01/app/oracle/product/12.2.0/dbhome_2/install/root_arrow.localdomain_2016-03-06_17-03-49.log for the output of root script
[root@arrow ~]# exit
logout
oracle@arrow:test12c:/u01/app/oracle/product/12.2.0/dbhome_2/clone/bin
$ /u01/app/oracle/product/12.2.0/dbhome_2/OPatch/opatch lspatches
22139226;Database PSU 12.1.0.2.160119, Oracle JavaVM Component (Jan2016)
21948354;Database Patch Set Update : 12.1.0.2.160119 (21948354)
OPatch succeeded.
oracle@arrow:test12c:/u01/app/oracle/product/12.2.0/dbhome_2/clone/bin
$ /u01/app/oracle/product/12.2.0/dbhome_2/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 12.1.0.1.10
Copyright (c) 2016, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/12.2.0/dbhome_2
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.2.0/dbhome_2/oraInst.loc
OPatch version : 12.1.0.1.10
OUI version : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.2.0/dbhome_2/cfgtoollogs/opatch/opatch2016-03-06_17-29-28PM_1.log
Lsinventory Output file location : /u01/app/oracle/product/12.2.0/dbhome_2/cfgtoollogs/opatch/lsinv/lsinventory2016-03-06_17-29-28PM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: localhost
ARU platform id: 226
ARU platform description:: Linux x86-64
Installed Top-level Products (1):
Oracle Database 12c 12.1.0.2.0
There are 1 products installed in this Oracle Home.
Interim patches (2) :
Patch 22139226 : applied on Sun Mar 06 15:46:50 PST 2016
Unique Patch ID: 19729684
Patch description: "Database PSU 12.1.0.2.160119, Oracle JavaVM Component (Jan2016)"
Created on 4 Jan 2016, 01:41:46 hrs PST8PDT
Bugs fixed:
19699946, 19176885, 19623450, 22139226, 19909862, 21811517, 19223010
21068507, 19895326, 19877336, 22118835, 22118851, 21566993, 19153980
20408829, 21047766, 19231857, 19895362, 19855285, 20415564, 21555660
19245191, 21047803, 20408866, 21566944
Patch 21948354 : applied on Sun Mar 06 15:35:02 PST 2016
Unique Patch ID: 19553095
Patch description: "Database Patch Set Update : 12.1.0.2.160119 (21948354)"
Created on 20 Dec 2015, 23:39:33 hrs PST8PDT
Sub-patch 21359755; "Database Patch Set Update : 12.1.0.2.5 (21359755)"
Sub-patch 20831110; "Database Patch Set Update : 12.1.0.2.4 (20831110)"
Sub-patch 20299023; "Database Patch Set Update : 12.1.0.2.3 (20299023)"
Sub-patch 19769480; "Database Patch Set Update : 12.1.0.2.2 (19769480)"
Bugs fixed:
19189525, 19075256, 19141838, 19865345, 19791273, 19280225, 18845653
20951038, 19243521, 19248799, 21756699, 18988834, 19238590, 21281532
20245930, 18921743, 18799063, 19134173, 19571367, 20476175, 20925795
19018206, 20509482, 20387265, 20588502, 19149990, 18849537, 18886413
17551063, 19183343, 19703301, 19001390, 18202441, 19189317, 19644859
19358317, 19390567, 19279273, 19706965, 19068970, 19619732, 20348653
18607546, 18940497, 19670108, 19649152, 18948177, 19315691, 19676905
18964978, 19035573, 20165574, 19176326, 20413820, 20558005, 19176223
19532017, 20134339, 19074147, 18411216, 20361671, 20425790, 18966843
20294666, 19307662, 19371175, 19195895, 19154375, 19468991, 19174521
19520602, 19382851, 21875360, 19326908, 19658708, 20093776, 20618595
21787056, 17835294, 19791377, 19068610, 20048359, 20746251, 19143550
19185876, 19627012, 20281121, 19577410, 22092979, 19001359, 19518079
18610915, 19490948, 18674024, 18306996, 19309466, 19081128, 19915271
20122715, 21188532, 20284155, 18791688, 20890311, 21442094, 18973548
19303936, 19597439, 20235511, 18964939, 19430401, 19044962, 19409212
19879746, 20657441, 19684504, 19024808, 18799993, 20877664, 19028800
19065556, 19723336, 19077215, 19604659, 21421886, 19524384, 19048007
18288842, 19689979, 20446883, 18952989, 16870214, 19928926, 21526048
19180770, 19197175, 19902195, 20318889, 19730508, 19012119, 19067244
20074391, 19512341, 19841800, 14643995, 20331945, 19587324, 19547370
19065677, 19637186, 21225209, 20397490, 18967382, 19174430, 18674047
19054077, 19536415, 19708632, 19289642, 20869721, 19335438, 17365043
18856999, 19869255, 20471920, 19468347, 21620471, 16359751, 18990693
17890099, 19439759, 19769480, 19272708, 19978542, 20101006, 21300341
20402832, 19329654, 19873610, 21668627, 21517440, 19304354, 19052488
20794034, 19291380, 18681056, 19896336, 19076343, 19561643, 18618122
20440930, 18456643, 19699191, 18909599, 19487147, 18250893, 19016730
18743542, 20347562, 16619249, 18354830, 19687159, 19174942, 20424899
19989009, 20688221, 20441797, 19157754, 19032777, 19058490, 19399918
18885870, 19434529, 19018447, 18417036, 20919320, 19022470, 19284031
20474192, 20173897, 22062026, 19385656, 19501299, 17274537, 20899461
19440586, 16887946, 19606174, 18436647, 17655240, 19023822, 19178851
19124589, 19805359, 19597583, 19155797, 19393542, 19050649
--------------------------------------------------------------------------------
OPatch succeeded.
oracle@arrow:test12c:/u01/app/oracle/product/12.2.0/dbhome_2/clone/bin
$
++++++++++
oracle@arrow:tiger:/u01/app/oraInventory/logs
$ ls -alrt|tail
-rw-r-----. 1 oracle oinstall 239 Mar 6 16:54 installActions2016-03-06_04-54-57PM.log
-rw-r-----. 1 oracle oinstall 0 Mar 6 16:56 oraInstall2016-03-06_04-55-18PM.err
-rw-r-----. 1 oracle oinstall 200 Mar 6 16:56 oraInstall2016-03-06_04-55-18PM.out
-rw-r-----. 1 oracle oinstall 11221 Mar 6 16:56 cloneActions2016-03-06_04-55-18PM.log
-rw-r-----. 1 oracle oinstall 0 Mar 6 16:58 oraInstall2016-03-06_04-58-03PM.err
-rw-r-----. 1 oracle oinstall 79 Mar 6 17:01 silentInstall2016-03-06_04-58-03PM.log
-rw-r-----. 1 oracle oinstall 1868 Mar 6 17:01 oraInstall2016-03-06_04-58-03PM.out
drwxrwx---. 6 oracle oinstall 4096 Mar 6 17:01 ..
-rw-r-----. 1 oracle oinstall 7338332 Mar 6 17:01 cloneActions2016-03-06_04-58-03PM.log
drwxrwx---. 3 oracle oinstall 4096 Mar 8 07:51 .
oracle@arrow:tiger:/u01/app/oraInventory/logs
$ grep -e '[[:upper:]]: ' cloneActions2016-03-06_04-58-03PM.log|cut -d ":" -f1|sort -u
INFO
WARNING
oracle@arrow:tiger:/u01/app/oraInventory/logs
$ grep -e '[[:upper:]]: ' cloneActions2016-03-06_04-58-03PM.log |grep "^WARNING: "
WARNING: You have not provided an email address. If you do not want to receive security updates, set 'DECLINE_SECURITY_UPDATES' to 'true'.
oracle@arrow:tiger:/u01/app/oraInventory/logs
$
++++++++++
oracle@arrow:test12c:/u01/app/oraInventory/ContentsXML
$ grep -i "home name" inventory.xml
<HOME NAME="OraDb11g_home1" LOC="/u01/app/oracle/product/11.2.0/dbhome_1" TYPE="O" IDX="1"/>
<HOME NAME="OraDB12Home1" LOC="/u01/app/oracle/product/12.2.0/dbhome_1" TYPE="O" IDX="2"/>
<HOME NAME="OraHome1" LOC="/u01/app/oracle/product/12.2.0/dbhome_2" TYPE="O" IDX="3"/>