. ./.profile
TODAY=`date +'%Y_%m%d'`
BINARY_DIR=/backup/HDDWEB/bin
EXPORT_DIR=/backup/HDDWEB/exp
TARGET_DIR=/backup/HJSMS/exp
TARGET_IP=IP주소
USERNAME=oracle
PASSWORD=oracle
####### FULL EXPORT : HDDWEB ########
cd $EXPORT_DIR
#exp system/system full=y compress=y file=`date +'%Y_%m%d'`_HDDWEB01.dmp,`date +'%Y_%m%d'`_HDDWEB02.dmp,`date +'%Y_%m%d'`_HDDWEB03.dmp filesize=800m log=`date +'%Y_%m%d'`_HDDWEB.log
exp system/system full=y compress=y file=`date +'%Y_%m%d'`_HDDWEB01.dmp,`date +'%Y_%m%d'`_HDDWEB02.dmp,`date +'%Y_%m%d'`_HDDWEB03.dmp filesize=800m > ${EXPORT_DIR}/${TODAY}_HDDWEB.log
=
find $EXPORT_DIR -mtime +1 -exec rm -f {} \;
compress $EXPORT_DIR/*.dmp
####### TRANSFER EXPORT FILE VIA FTP => HJSMS ##############
function ftptransfer
{
ftp -v -n $TARGET_IP <
cd $TARGET_DIR
lcd $EXPORT_DIR
prompt
bin
mput $TODAY*.Z
mput $TODAY*.log
quit
ENDline
}
ftptransfer
############################################################
ls $EXPORT_DIR/$TODAY_* > $BINARY_DIR/db_export.lst
mailx -s 'FULL EXPORT : HDDWEB, HDDCC, HJTWMS, HJTEDI' aaa@bbb.co.kr < $BINARY_DIR/db_export.lst
댓글 없음:
댓글 쓰기