# $Header: EXP_TAB_cmprss.sh
# *====================================================================================+
# | Author - DBACLASS ADMIN TEAM
# | |
# +====================================================================================+
# |
# | FILENAME
# | EXP_table_bkp_cmprss_dbaclass.sh
# |
# | DESCRIPTION
# | Daily Export backup script of a list of table
# | PLATFORM
# | Linux/Solaris
# +===========================================================================+
#!/bin/bash
echo Set Oracle Database Env
export ORACLE_SID=$1
export ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
export PATH=$ORACLE_HOME/bin:$PATH:/usr/local/bin
export TIMESTAMP=`date +%a%d%b%Y`
export dir1=/u02/backup/export
echo =======
echo Export command
echo =======
echo $ORACLE_HOME
$ORACLE_HOME/bin/expdp \'/ as sysdba\' directory=dir1 dumpfile=expdp_pdb1_${TIMESTAMP}_%U.dmp logfile=expdp_log_${TIMESTAMP}.log full=y
PARALLEL=6 COMPRESSION=ALL
echo SEND MAIL TO STAKE HOLDERS
echo =======
mailx -s "$ORACLE_SID $TIMESTAMP Export backup logfile" shymon.ravi@nttdata.com < $EXP_DIR/expdp_log_${TIMESTAMP}.log
echo Export completed at $TIMESTAMP
exit
chmod 755 EXP_TAB_cmprss.sh
00 15 * * * /u02/backup/export/export.sh PHFMDB
No comments:
Post a Comment