DOYENSYS Knowledge Portal




We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal




Thursday, March 31, 2016

Auto Apply Patch in DR from PROD in weblogicserver



Scripts


#!/bin/bash
#############################################################Move_bkp.sh#############################################
cd /data/bea/user_projects/domains/domain_FirstGen/
for f in *.ear
do
   cp -rf $f /data/bea/user_projects/domains/domain_FirstGen/${f%.ear}.ear_bkp_$(date +%m%d%y)
rm -rf $f
done
############################################################## Test1.sh ###############################################
ssh root@192.168.1.1 "bash -s" < /xgen/xgtest3/script/move_bkp.sh >> /xgen/xgtest3/script/1.log

scp -r /xgen/xgtest3/bea/user_projects/domains/domain_FirstGen/*.ear root@192.168.1.1:/data/bea/user_projects/domains/domain_FirstGen

 

 

 

Scripts Explanation


#!/bin/bash
#############################################################Move_bkp.sh#############################################
cd /data/bea/user_projects/domains/domain_FirstGen/
for f in *.ear
do
   cp -rf $f /data/bea/user_projects/domains/domain_FirstGen/${f%.ear}.ear_bkp_$(date +%m%d%y)
rm -rf $f
done


Move_bkp
           
            In move_bkp  script we have to take backup of the previous ear files in DR site to copy the new ear file in DR.


Scripts for Test1

ssh root@192.168.1.1 "bash -s" < /xgen/xgtest3/script/move_bkp.sh >> /xgen/xgtest3/script/1.log

scp -r /xgen/xgtest3/bea/user_projects/domains/domain_FirstGen/*.ear root@192.168.1.1:/data/bea/user_projects/domains/domain_FirstGen



Test
         
This is the main script it calls the move_bkp script to take backup of old ear files in DR and copy the new ear files from PROD to DR

1 comment:

Sridevi K said...


Regards
Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
LinkedIn profile - https://in.linkedin.com/in/sridevi-koduru-9b876a8b
Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at training@oracleappstechnical.com | +91 - 9581017828.