Friday, 13 September 2013

Fusion Middleware Weblogic 11g and SOA Suite Clone and Migration

Purpose:

   Clone Fusion Middleware Weblogic 11g software and SOA suite from one server to another server without any data lose.
 
Step 1:
   Identify the values for the below parameter in source and target location

Source System:
MW_HOME=/s01/soa/weblogic
Backup Location=/bkp/soa/
Java Home=/s01/soa/jdk1.6.0_25
Password file=/bkp/soa/pass.txt
Hostname=iamsource.com

Target System:
MW_HOME=/t01/soa/weblogic
Backup Location=/backup/soa/
Java Home=/t01/soa/jdk1.6.0_25
Password File=/backup/soa/pass.txt
Hostname=iamtarget.com

Step 2:
   Copy the basic clone script and java from source to backup location

cp $MW_HOME/oracle_common/bin/pasteBinary.sh /bkp/soa/
cp $MW_HOME/oracle_common/jlib/cloningclient.jar /bkp/soa/
cp /s01/soa/jdk1.6.0_25 /bkp/soa/
cp /s01/soa/jrockit/jrmc-3.1.2-1.6.0 /bkp/soa/


Step 3:
    Backup Fusion Middleware Weblogic 11g software to backup location
  
$MW_HOME/oracle_common/bin/copyBinary.sh -javaHome /s01/soa/jrockit/jrmc-3.1.2-1.6.0 -archiveLoc /bkp/soa/mw_copy.jar -sourceMWHomeLoc /s01/soa/weblogic -invPtrLoc /etc/oraInst.loc

Verify the log for the below line as confirmation of archive created successfully
================================================================================================
INFO : Sep 11, 2013 11:14:13 AM - CLONE-21032   Archive created successfully at /bkp/soa/mw_copy.jar.
INFO : Sep 11, 2013 11:14:19 AM - CLONE-21006   Total time taken by cloningclient was "643" seconds.

INFO : Sep 11, 2013 11:14:19 AM - CLONE-21007   Cloning operation completed successfully.

=================================================================================================

Step 4:
    Create password file in any prefered location of weblogic adminstrator.

cat /bkp/soa/pass.txt
weblogic123


Step 5:
    Clone the SOA Suite components. Make sure that Weblogic and all managed services are up and running while running the copyConfig.sh script

$MW_HOME/oracle_common/bin/copyConfig.sh -javaHome /s01/soa/jrockit/jrmc-3.1.2-1.6.0 -archiveLoc /bkp/soa/fmwsoa_copy.jar -sourceDomainLoc /s01/soa/weblogic/user_projects/domains/base_domain -sourceMWHomeLoc /s01/soa/weblogic -domainHostName iamsource.com -domainPortNum 7001 -domainAdminUserName weblogic -domainAdminPassword /bkp/soa/pass.txt -silent true

Step 6:
    Create the execute plan for the clone.

$MW_HOME/oracle_common/bin/extractMovePlan.sh -javaHome /s01/soa/jrockit/jrmc-3.1.2-1.6.0 -archiveLoc /bkp/soa/fmwsoa_copy.jar -planDirLoc /bkp/soa/moveplan

Step 7:
    On target node, mount or copy the backup files.

Step 8:
    On the target node, create Fusion Middleware base directory and Java home
  
mkdir -p /t01/soa/weblogic
cp /backup/soa/jrockit/jrmc-3.1.2-1.6.0 /t01/soa/
cp /backup/soa/jdk1.6.0_25    /t01/soa/


export JAVA_HOME=/t01/soa/jdk1.6.0_25
export PATH=/t01/soa/jrockit/jrmc-3.1.2-1.6.0/bin:/t01/soa/jdk1.6.0_25/bin:$PATH


Step 9:
    Extract the cloned middleware home
  
/backup/soa/pasteBinary.sh -javaHome /t01/soa/jrockit/jrmc-3.1.2-1.6.0 -archiveLoc /backup/soa/mw_copy.jar -targetMWHomeLoc /t01/soa/weblogic

Step 10:
   Edit the move_plan.xml created under /backup/soa/moveplan/move_plan.xml for the following values

- Look for IP address of source and change to target value
- If the database was also migrated look for all jdbc and database connection string and change it accordingly
- Look for the tag "Password File" and update the value tag from "<value/>" to "<value>/backup/soa/pass.txt</value>"

Step 11:
    The final step to extract, configure and start Fusion Middleware Weblogic with SOA Suite.
  
$MW_HOME/oracle_common/bin/pasteConfig.sh -javaHome /t01/soa/jrockit/jrmc-3.1.2-1.6.0 -archiveLoc /backup/soa/fmwsoa_copy.jar -targetDomainLoc /t01/soa/weblogic/user_projects/domains/base_domain -targetMWHomeLoc /t01/soa/weblogic -movePlanLoc /backup/soa/moveplan/move_plan.xml -domainAdminPassword /backup/soa/pass.txt -logDirLoc /tmp/log


Document refered: http://technology.amis.nl/2011/08/11/clone-your-oracle-fmw-soa-suite-11g/

3 comments:

  1. Thanks Karthik..
    A little doubt here...How is the above set of steps different from the app(copy-paste) & db cloning?
    I usually perform below steps..
    1> copy the application root folder from source.
    2> paste it to target sytem.
    3> Ask DBA to clone DB
    4> Change IPs and other configurations in weblogic.

    I just want to know why we should prefer to use pasteConfig.sh or as mentioned in the document... Is there any major difference?

    ReplyDelete
  2. Even I have the same question as Prakash. Can you please let me know if there is a difference between the two methods.

    ReplyDelete
  3. hi How to script these commands ? I f we put them in a shell script, its getting exited after first command like after cloning mw home , not proceeding to the next like of code. how can we put all there together in shell script ? anybody did that already ?

    ReplyDelete