{"id":5363,"date":"2013-04-03T12:31:40","date_gmt":"2013-04-03T16:31:40","guid":{"rendered":"http:\/\/onlineappsdba.com\/?p=5363"},"modified":"2013-04-03T12:31:40","modified_gmt":"2013-04-03T16:31:40","slug":"cloning-middleware-home-using-movement-scripts-copybinary-shpastebinary-sh","status":"publish","type":"post","link":"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/03\/cloning-middleware-home-using-movement-scripts-copybinary-shpastebinary-sh\/","title":{"rendered":"Cloning Middleware Home using Movement Scripts (copyBinary.sh,pasteBinary.sh)"},"content":{"rendered":"<p>Recently I came across a requirement to create a high availability OAM environment.<\/p>\n<p>&#8220;There existed a running OAM\/OID environment on Node1. A cluster for OAM Domain was required to be created. OAM Domain has deployments on Admin Server and oam_server1 (Node 1) managed server.<br \/>\nTo extend domain for clustering managed servers for OAM , I needed to do following tasks :<br \/>\n1. Extending OAM domain on node1 to create a cluster having managed servers oam_server1(already existing on node1) and oam_server2 (new one on node2)<br \/>\n<strong>2. Install WebLogic Server binaries on Node 2.<\/strong><br \/>\n<strong> 3. Install OAM Oracle Home on Node 2.<\/strong><br \/>\n4. Create OAM domain on Node2 (using pack.sh and unpack.sh)<br \/>\n5. Start managed servers on Node 1 and Node 2.&#8221;<\/p>\n<p>&nbsp;<\/p>\n<p>Aim of this post is not creating High availability OAM environment but to show <strong>how we can utilise cloningclient(movement scripts) in WLS<\/strong> to avoid rework in such scenarios. Read more about movement scripts <a title=\"here\" href=\"https:\/\/onlineappsdba.com\/index.php\/2011\/05\/25\/cloning-oracle-fusion-middleware-11g-soa-webcenter-ucm-copybinary-copyconfig-extractmoveplan-pastebinary-pasteconfig-cloningclientjar\/\">here<\/a>.<br \/>\nThe movement scripts minimize the amount of work that would otherwise be required to reapply all the customization and configuration changes made in one environment to another.<br \/>\n<font color=\"blue\"><br \/>\nYou can use these scripts to:<br \/>\n\u2022 <strong>Create a Middleware home that is a copy of a production<\/strong>, test, or development environment. The scripts create a new Middleware home with all patches applied to all of the Oracle homes and the WebLogic Server home in a single step. This is in contrast to separately installing and applying any patches to the WebLogic Server home and separate Oracle homes.<br \/>\n\u2022 Prepare a &#8220;gold&#8221; image of a patched Middleware home and deploying it to many hosts.<br \/>\n\u2022 Move the configuration of a domain or Oracle instance, including the components in the domain or Oracle instance, from one environment to another.<br \/>\n<\/font><br \/>\nSo Instead of Installing WLS Oracle Home and OAM Oracle Home on Node 2 , I decided to clone Middleware Home and Oracle homes from Node 1 environment.<\/p>\n<p>We will clone WebLogic oracle home and OAM Oracle Home using WebLogic cloningclient.<br \/>\n1. Check oraInst.loc file, if it is pointing to right Inventory.<br \/>\n2. Verify Oracle Homes listed in Inventory.xml.<br \/>\n3. If there are any extra Oracle Homes, backup the original Inventory.xml and delete the entry of Oracle Home which is not to be cloned.<br \/>\n4. Check the JAVA_HOME<\/p>\n<p><em>username@Node1 $ which java<\/em><br \/>\n<em> \/usr\/java6_64\/jre\/bin\/java<\/em><br \/>\n5. Change directory to $MW_HOME\/oracle_common\/bin<br \/>\n<em>username@Node1 $ pwd<\/em><br \/>\n<em> \/u02\/AMDEV\/Middleware\/Weblogic\/oracle_common\/bin<\/em><br \/>\n6. Run<strong> copyBinary.sh as below<\/strong><br \/>\n<em><span style=\"color: red\">username@Node1 $ copyBinary.sh -javaHome \/usr\/java6_64 -archiveLoc \/oadbbackup\/AMDEV\/mw_copy.jar -sourceMWHomeLoc \/u02\/AMDEV\/Middleware\/Weblogic -invPtrLoc \/etc\/oraInst.loc -logDirLoc \/u02\/AMDEV\/Middleware\/clone_log\/ -ignoreDiskWarning true<\/span><\/em><\/p>\n<p><em>Log File: &#8220;\/u02\/AMDEV\/Middleware\/clone_log\/CLONE2013-04-01_05-15-29AM.log&#8221;.<\/em><br \/>\n<em> Error File: &#8220;\/u02\/AMDEV\/Middleware\/clone_log\/CLONE2013-04-01_05-15-29AM.error&#8221;.<\/em><br \/>\n<em> &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<\/em><br \/>\nIn my case \/oadbbackup\/AMDEV is the shared mountpoint where i am creating mw_copy.jar archive.<br \/>\n<strong>What this script does:<\/strong><span style=\"color: blue\"><br \/>\na. First this script checks prerequisites.<br \/>\nb. Creates archive for Middleware Home..<br \/>\nc. Adds archive of Middleware home to the main jar file.<br \/>\nd. Does b and c for all Oracle Homes in Middleware Home.<br \/>\ne. Creates permission files for each Oracle Home and add them to main archive.<\/span><br \/>\nMake sure there is enough space for jar file to be created.<br \/>\nIf everything goes fine, you will see below message on Shell prompt.<\/p>\n<p><em>INFO : Apr 1, 2013 5:26:20 AM &#8211; CLONE-21032 Archive created successfully at \/oadbbackup\/AMDEV\/mw_copy.jar.<\/em><br \/>\n<em> INFO : Apr 1, 2013 5:26:28 AM &#8211; CLONE-21006 Total time taken by cloningclient was &#8220;658&#8221; seconds.<\/em><br \/>\n<em> INFO : Apr 1, 2013 5:26:28 AM &#8211; CLONE-21007 Cloning operation completed successfully.<\/em><br \/>\n<em> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/em>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\n<strong><\/strong><\/p>\n<p><strong>Now we will run pastebinary.sh script on target server<\/strong>.<br \/>\nBefore that, we have to ensure:<br \/>\n1. Directory Structure similar to source exists on target example \/u02\/AMDEV\/Middleware\/ in my case.<br \/>\n2. Java is installed on target host. Please version compatibility accordingly.<br \/>\n3. File oraInst.loc exists and point to a directory OraInventory. It is better to copy the oraInst.loc from source and make OraInventory at a location specified.<br \/>\n4. Pastebinary.sh and cloninclient.jar exists in same directory on target Server. Copy both the files from Source Middleware Home.<br \/>\nGo to the directory where pastebinary.sh and cloningclient.jar exist.<br \/>\nSet JAVA_HOME and PATH environment variables.<br \/>\n<em> export JAVA_HOME=&lt;path to your JDK&gt;<\/em><br \/>\n<em> export PATH=$PATH:$JAVA_HOME\/bin<\/em><br \/>\n<strong>Run pastebinary.sh as below:<\/strong><br \/>\n<em><span style=\"color: red\">username@Node2 $ pasteBinary.sh -javaHome \/usr\/java6_64 -archiveLoc \/oadbbackup\/AMDEV\/mw_copy.jar -targetMWHomeLoc \/u02\/AMDEV\/Middleware\/Weblogic -invPtrLoc \/u02\/AMDEV\/oraInventory\/oraInst.loc<\/span><\/em><br \/>\n<em> Log File: &#8220;\/tmp\/CLONE2013-04-01_07-14-34AM-LOG\/CLONE2013-04-01_07-14-34AM.log&#8221;.<\/em><br \/>\n<em> Error File: &#8220;\/tmp\/CLONE2013-04-01_07-14-34AM-LOG\/CLONE2013-04-01_07-14-34AM.error&#8221;.<\/em><br \/>\n<em> &#8230;&#8230;&#8230;&#8230;&#8230;..<\/em><br \/>\n<strong>What happens when Pastebinary.sh runs:<\/strong><span style=\"color: blue\"><br \/>\na. Checks prerequisites on target host.<br \/>\nb. Extracts and restores the Middleware Home from archive file.<br \/>\nc. Extracts Oracle Homes, makes their directory structures.<br \/>\nd. Configures Oracle Homes.<br \/>\ne. Sets the permissions for Oracle Homes.<br \/>\nf. Updates the Inventory.<\/span><br \/>\nIf everything goes smooth, you will notice the below like messages.<br \/>\n<em>INFO : Apr 1, 2013 7:21:56 AM &#8211; CLONE-21037 Time taken to restore all cloners from archive was &#8220;434,544&#8221; milliseconds.<\/em><br \/>\n<em> INFO : Apr 1, 2013 7:21:56 AM &#8211; CLONE-21006 Total time taken by cloningclient was &#8220;441&#8221; seconds.<\/em><br \/>\n<em> INFO : Apr 1, 2013 7:21:56 AM &#8211; CLONE-21007 Cloning operation completed successfully.<\/em><\/p>\n<p>Now if required ,we can clone the configurations from source to target using : copyconfig.sh, extractMovePlan.sh and pasteconfig.sh scripts<\/p>\n<p>Since my requirement was not to clone configuration, i didn\u2019t run the above scripts,I will try to take that up in separate post.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I came across a requirement to create a high availability OAM environment. &#8220;There existed a running OAM\/OID environment on [&hellip;]<\/p>\n","protected":false},"author":115,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[217],"tags":[],"class_list":["post-5363","post","type-post","status-publish","format-standard","hentry","category-weblogic"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Cloning Middleware Home using Movement Scripts (copyBinary.sh,pasteBinary.sh) -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/03\/cloning-middleware-home-using-movement-scripts-copybinary-shpastebinary-sh\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Cloning Middleware Home using Movement Scripts (copyBinary.sh,pasteBinary.sh) -\" \/>\n<meta property=\"og:description\" content=\"Recently I came across a requirement to create a high availability OAM environment. &#8220;There existed a running OAM\/OID environment on [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/03\/cloning-middleware-home-using-movement-scripts-copybinary-shpastebinary-sh\/\" \/>\n<meta property=\"article:published_time\" content=\"2013-04-03T16:31:40+00:00\" \/>\n<meta name=\"author\" content=\"Masroof Ahmad\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Masroof Ahmad\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/03\/cloning-middleware-home-using-movement-scripts-copybinary-shpastebinary-sh\/\",\"url\":\"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/03\/cloning-middleware-home-using-movement-scripts-copybinary-shpastebinary-sh\/\",\"name\":\"Cloning Middleware Home using Movement Scripts (copyBinary.sh,pasteBinary.sh) -\",\"isPartOf\":{\"@id\":\"https:\/\/onlineappsdba.com\/#website\"},\"datePublished\":\"2013-04-03T16:31:40+00:00\",\"author\":{\"@id\":\"https:\/\/onlineappsdba.com\/#\/schema\/person\/909a876ed58d400faf82caf81d61bfdb\"},\"breadcrumb\":{\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/03\/cloning-middleware-home-using-movement-scripts-copybinary-shpastebinary-sh\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/03\/cloning-middleware-home-using-movement-scripts-copybinary-shpastebinary-sh\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/03\/cloning-middleware-home-using-movement-scripts-copybinary-shpastebinary-sh\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/onlineappsdba.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cloning Middleware Home using Movement Scripts (copyBinary.sh,pasteBinary.sh)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/onlineappsdba.com\/#website\",\"url\":\"https:\/\/onlineappsdba.com\/\",\"name\":\"\",\"description\":\"Oracle Implementation &amp; Training Experts\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/onlineappsdba.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/onlineappsdba.com\/#\/schema\/person\/909a876ed58d400faf82caf81d61bfdb\",\"name\":\"Masroof Ahmad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/onlineappsdba.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/10f9db7bdbbd7f9ccfbe9b2d208e5978fc28315e9c704383e639a926ea0fce5f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/10f9db7bdbbd7f9ccfbe9b2d208e5978fc28315e9c704383e639a926ea0fce5f?s=96&d=mm&r=g\",\"caption\":\"Masroof Ahmad\"},\"url\":\"https:\/\/onlineappsdba.com\/index.php\/author\/masroof\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Cloning Middleware Home using Movement Scripts (copyBinary.sh,pasteBinary.sh) -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/03\/cloning-middleware-home-using-movement-scripts-copybinary-shpastebinary-sh\/","og_locale":"en_US","og_type":"article","og_title":"Cloning Middleware Home using Movement Scripts (copyBinary.sh,pasteBinary.sh) -","og_description":"Recently I came across a requirement to create a high availability OAM environment. &#8220;There existed a running OAM\/OID environment on [&hellip;]","og_url":"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/03\/cloning-middleware-home-using-movement-scripts-copybinary-shpastebinary-sh\/","article_published_time":"2013-04-03T16:31:40+00:00","author":"Masroof Ahmad","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Masroof Ahmad","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/03\/cloning-middleware-home-using-movement-scripts-copybinary-shpastebinary-sh\/","url":"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/03\/cloning-middleware-home-using-movement-scripts-copybinary-shpastebinary-sh\/","name":"Cloning Middleware Home using Movement Scripts (copyBinary.sh,pasteBinary.sh) -","isPartOf":{"@id":"https:\/\/onlineappsdba.com\/#website"},"datePublished":"2013-04-03T16:31:40+00:00","author":{"@id":"https:\/\/onlineappsdba.com\/#\/schema\/person\/909a876ed58d400faf82caf81d61bfdb"},"breadcrumb":{"@id":"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/03\/cloning-middleware-home-using-movement-scripts-copybinary-shpastebinary-sh\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/onlineappsdba.com\/index.php\/2013\/04\/03\/cloning-middleware-home-using-movement-scripts-copybinary-shpastebinary-sh\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/03\/cloning-middleware-home-using-movement-scripts-copybinary-shpastebinary-sh\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/onlineappsdba.com\/"},{"@type":"ListItem","position":2,"name":"Cloning Middleware Home using Movement Scripts (copyBinary.sh,pasteBinary.sh)"}]},{"@type":"WebSite","@id":"https:\/\/onlineappsdba.com\/#website","url":"https:\/\/onlineappsdba.com\/","name":"","description":"Oracle Implementation &amp; Training Experts","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/onlineappsdba.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/onlineappsdba.com\/#\/schema\/person\/909a876ed58d400faf82caf81d61bfdb","name":"Masroof Ahmad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/onlineappsdba.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/10f9db7bdbbd7f9ccfbe9b2d208e5978fc28315e9c704383e639a926ea0fce5f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/10f9db7bdbbd7f9ccfbe9b2d208e5978fc28315e9c704383e639a926ea0fce5f?s=96&d=mm&r=g","caption":"Masroof Ahmad"},"url":"https:\/\/onlineappsdba.com\/index.php\/author\/masroof\/"}]}},"_links":{"self":[{"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/posts\/5363","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/users\/115"}],"replies":[{"embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/comments?post=5363"}],"version-history":[{"count":0,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/posts\/5363\/revisions"}],"wp:attachment":[{"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/media?parent=5363"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/categories?post=5363"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/tags?post=5363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}