Wednesday, March 8, 2017

Cloning of SOA server 11.1.1.4.0 in HP-UX system

The following commands are applicable for the supported cloning process:

-  MW_HOME/oracle_common/bin/copyBinary.sh
-  MW_HOME/oracle_common/bin/copyConfig.sh
-  MW_HOME/oracle_common/bin/extractMovePlan.sh
-  MW_HOME/oracle_common/bin/pasteBinary.sh
-  MW_HOME/oracle_common/bin/pasteConfig.sh



Steps:

1.Run the copyBinary.sh script in source system as,

MW_HOME/oracle_common/bin/copyBinary.sh


Syntax:

./copyBinary.sh -javaHome <Java_location> -archiveLoc <Location where you want to save the generated archive> -sourceMWHomeLoc <Location of middleware home>

Example:

./copyBinary.sh -javaHome /opt/java6 -archiveLoc /isoa/dev_clone/cp_dev_binary.jar -sourceMWHomeLoc /isoa/oracle/middleware

2. Now copy the generated jar file to target system as,

$scp /isoa/dev_clone/cp_dev_binary.jar <username>@<IP of target>:/isoa/clone


3. Now on target server, first of all create directory structure for middleware home as,


$mkdir -p /isoa/oracle



4. Now run the pasteBinary.sh script on target as,


MW_HOME/oracle_common/bin/pasteBinary.sh



Syntax:

/isoa/clone/./pasteBinary.sh -javaHome <JAVA_HOME> -archiveLoc <Location of jar file> -targetMWHomeLoc <MW_Home>

Example:

$ /isoa/clone/./pasteBinary.sh -javaHome /opt/java6 -archiveLoc /isoa/clone/soa_clone_tmp_dir/cp_dev_binary.jar -targetMWHomeLoc /isoa/oracle/middleware

Though the command is long and there is a limitation of words in HP-UX OS, so we put the whole command in a script and then run that script as,


$vi binarycopy.sh

Now copy the command to the script and then run the script as,

$./binarycopy.sh

 
 



5. Now on Source system, run the copyConfig.sh script as,

MW_HOME/oracle_common/bin/copyConfig.sh

Syntax:

./copyConfig.sh -javaHome <Java Home> -archiveLoc <Generated archive location> -sourceDomainLoc <Source domain Location> -sourceMWHomeLoc <Source Middleware Location> -domainHostName <ip or hostname of the source server> -domainPortNum <port> -domainAdminUserName <username> -domainAdminPasswordFile <Path of plain text password file> -silent false

 Example:

./copyConfig.sh -javaHome /opt/java6 -archiveLoc /isoa/dev_clone/mw_config_backup.jar -sourceDomainLoc /isoa/oracle/middleware/user_projects/domains/soadev_domain -sourceMWHomeLoc /isoa/oracle/middleware -domainHostName idevsoz1 -domainPortNum 7001 -domainAdminUserName weblogic -domainAdminPasswordFile /isoa/oracle/middleware/oracle_common/bin/pwd.txt -silent false

Note : We again put this command in a script, but after 3-4 hours, it gives an error of "GC limit exceeded". So we also define java arguments in the script as,

$vi configcopy.sh

 


Now run the configcopy script as,

$./configcopy.sh

 

When this script will completed successfully, a jar file named “mw_config_backup.jar” will be created.




6. Now on source system, run extractMovePlan.sh script as,

This command will extract a move plan from the copy archive created from the copyConfig command.

Syntax:

./extractMovePlan -javaHome <Java Home> -archiveLoc <ARCHIVE_LOC> -movePlanDir <PLAN_DIR>

Example:

./extractMovePlan -javaHome /opt/java6 -archiveLoc /isoa/dev_clone/mw_config_backup.jar -planDirLoc /isoa/dev_clone/moveplan

It will generate moveplan.xml file in moveplan directory.




7. Change moveplan.xml file according to target server

In movepaln directory there is an xml file named moveplan.xml, change the following info. According to target server

-Hostname or IP address of the Admin server, Managed servers
-DB hostname,Port no. and Service Name
-Datasource password file location etc.



8. Copy config jar file and moveplan directory to target system 

 $scp mw_config_backup.jar <username>@<IP of target server>:/isoa/clone

$ scp -r moveplan <username>@<IP of target server>:/isoa/clone


9. On the target system, run pasteConfig.sh script as, 

Here create a password file of weblogic user password as,
$cd /isoa/clone
$vi pwd.txt

Here just write the password of weblogic user.

Now go to “MW_HOME/oracle_common/bin” and run the pasteConfig.sh script as,

Syntax:

./pasteConfig.sh -javaHome <JAVA_HOME> -archiveLoc <jar file location> -targetDomainLoc <Location where you want to create domain on target> -targetMWHomeLoc <MW_Home> -movePlanLoc <moveplan.xml file location> -domainAdminPassword <Password file location>

Example:

/isoa/oracle/middleware/oracle_common/bin/./pasteConfig.sh -javaHome /opt/java6 -archiveLoc /isoa/clone/mw_config_backup.jar -targetDomainLoc /isoa/oracle/middleware/user_projects/domains/soapch_domain -targetMWHomeLoc /isoa/oracle/middleware -movePlanLoc /isoa/clone/moveplan/moveplan.xml -domainAdminPassword /isoa/clone/pwd.txt


Note: Here again we have put this command in a script named configcopy.sh as,

$vi configcopy.sh

 

Now run the script as,

$./configcopy.sh
 

When this script will execute successfully, there will be a message that “Cloning is successful”.

Now Start the weblogic server and then managed servers.








No comments:

Post a Comment