oracle根据数据量应该采取多种备份机制相结合的方式进行

[oracle@clu2 bin]$ cat exp.sh
export LC_ALL="zh_CN.GBK"
export LANG="zh_CN.GBK"
export TMP=/tmp
export TMPDIR=/tmp
export ORACLE_SID=racdb2
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
export ORA_CRS_HOME=/u01/crs/oracle/product/10.2.0/crs
export ORACLE_PATH=$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib:/usr/X11R6/lib
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export ORACLE_OWNER=oracle
export PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
export PATH=$PATH:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin
export NLS_LANG="simplified chinese_china.zhs16gbk"
export LD_LIBRARY_PATH
pddd="/racbak/data/racwebdb/bak$(date +%Y%m%d%R)"
oddd="/u01/app/oracle/product/10.2.0/db_1/bin"
mkdir $pddd
$oddd/exp ticket/20000@racwebdb file=$pddd/ticketracwebdb.dmp log=$pddd/ticketracwebdb.log direct=y statistics=none

 

[oracle@clu2 data]$ cat aobak.sh
#echo "Now,baking............................."
bpp="/racbak/data/racwebdb"
pp="/racbak/data/"
ppp="/racbak/data/racwebdb"
ddd=`date +%Y%m%d`
dddd=`date +%Y%m%d%k`
ddd7=`date -d -7days +%Y%m%d`
cd $pp
echo "open 192.168.111.216" > autobak.txt
echo "user  upuser up@user" >> autobak.txt
echo "cd dataracwebdb" >> autobak.txt
echo "bin"  >> autobak.txt
echo "lcd racwebdb" >> autobak.txt
echo "put bak$ddd.tar.gz" >> autobak.txt
echo "bye" >> autobak.txt
sleep 5
cd $ppp
tar zcvf bak$ddd.tar.gz bak$ddd* > $pp/log/bakracwebdb.log 2> $pp/log/bakracwebdberr.log
sleep 5
#ls -l jboss-253.$dddd.*
cd $pp
ftp -i -n < $pp/autobak.txt &> $pp/log/ftpup.log
sleep 2
rm -rf $ppp/bak$ddd7* &>  $pp/log/rmfileracwebdb.log
#echo "-------------------ok-----------------"

 

export LC_ALL="zh_CN.GBK"
export LANG="zh_CN.GBK"

export PATH
export TMP=/tmp
export TMPDIR=/tmp
export ORACLE_SID=racdb2
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
export ORA_CRS_HOME=/u01/crs/oracle/product/10.2.0/crs
export ORACLE_PATH=$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib:/usr/X11R6/lib
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export ORACLE_OWNER=oracle
export PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin
export LD_LIBRARY_PATH

export NLS_LANG="simplified chinese_china.zhs16gbk"

 imp userid=wgz1/wgz1@racdb file=ticketracwebdb.dmp fromuser=ticket touser=wgz1 ignore=y

本文出自 “云计算与大数据_jxwpx” 博客,谢绝转载!

你可能感兴趣的:(oracle,数据,机制,相结合,采取)