Quantcast
Channel: Doyensys Allappsdba Blog..
Viewing all articles
Browse latest Browse all 1640

Auto Apply Patch in DR from PROD in weblogicserver

$
0
0


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


Viewing all articles
Browse latest Browse all 1640

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>