标签:备份 div 2.0 ica span 配置 exit rect /etc
#!/bin/bash . /etc/profile . ~/.bash_profile ORACLE_BASE="/opt/oracle11g" export ORACLE_BASE ORACLE_HOME="/opt/oracle11g/product/11.2.0" export ORACLE_HOME ORACLE_SID="orcl" export ORACLE_SID export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK LD_LIBRARY_PATH="$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib" export LD_LIBRARY_PATH PATH="$ORACLE_HOME/bin:/sbin":$PATH export PATH schemas="succezbi sdgsbi" orabak=/data1/orabak dd=`date +%F%s` bd=15 for i in `echo $schemas`;do expdp \" / as sysdba\" schemas=${i} directory=orabak dumpfile=${i}_${dd}.dmp logfile=${i}_${dd}.log reuse_dumpfiles=y scp ${i}_${dd}.dmp root@10.48.43.215:/opt/backup39 scp ${i}_${dd}.log root@10.48.43.215:/opt/backup39 done #在删除文件前测试目录变量是否存在.如果失效直接退出 [ -z $orabak ] && exit 1 find $orabak -mtime +${bd} -exec rm -rf {} \;
标签:备份 div 2.0 ica span 配置 exit rect /etc
原文地址:https://www.cnblogs.com/sorliran/p/9181997.html