Thursday, May 17, 2018

Copy Archive log from ASM to NFS

for thisfile in $(asmcmd ls +RECO_DG/MyDB/ARCHIVELOG/2017_05_15 )
do
if [[ -e "/mnt/staging/MyDB1/$thisfile" ]] ; then
   echo "$thisfile already existed in  NFS"
else
   echo "Coping file $thisfile"
   asmcmd cp +RECO_DG/MyDB/ARCHIVELOG/2019_05_15/$thisfile    /mnt/staging/MyDB1/
   echo "Copied file $thisfile"
   echo "-------------------------------------------------------"
fi
done

No comments:

Post a Comment