ITPub博客

首页 > Linux操作系统 > Linux操作系统 > backup .bash_profile

backup .bash_profile

原创 Linux操作系统 作者:yhj20041128001 时间:2011-05-11 20:37:33 0 删除 编辑


PATH=$PATH:$HOME/bin

export PATH
export TMP=/tmp
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/10205
export ORACLE_SID=rman1
export ORACLE_TERM=xterm
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS10=$ORACLE_HOME/nls/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32:$GGATE:$ORACLE_HOME/srvm/lib:/lib:/usr/lib:/usr/openwin/lib:/usr/local/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/network/jlib
export JAVA_HOME=$ORACLE_BASE/jre/1.4.2
export JAVA_BINDIR=$JAVA_HOME/bin
export SDK_HOME=$JAVA_HOME
export JDK_HOME=$JAVA_HOME
export PATH=$ORACLE_HOME/bin:$PATH:$GGATE:$ORACLE_HOME/OPatch
# export NLS_LANG='TRADITIONAL CHINESE_TAIWAN'.ZHT16BIG5
# export NLS_LANG='TRADITIONAL CHINESE_TAIWAN'.ZHT16BIG5
export NLS_LANG='TRADITIONAL CHINESE_TAIWAN'.AL32UTF8
export THREADS_FLAG=native
export H=$ORACLE_HOME
export CM=$ORACLE_HOME/oracm
#export LD_ASSUME_KERNEL=2.4.21
#export LD_ASSUME_KERNEL=2.4.18
export TERM=vt100
export AGTCTL_ADMIN=$ORACLE_HOME/network/agent/config
umask 022
export PS1=`hostname`'<$PWD>$'

rm -f /Data/backupdata/rman1/*;
mv    /Data/script/rman/rmanlog/* /Data/script/rman/log
rmanbdate=`date +%Y%m%d%H%M%S`

echo 'Begin backup at:'$rmanbdate >> /Data/script/rman/time.log;

rman target / @'/Data/script/rman/fulldb.sql' log /Data/script/rman/rmanlog/'rman1.'$rmanbdate'.log';
rmanedate=`date +%Y%m%d%H%M%S`
echo 'End backup at:'$rmanedate >> /Data/script/rman/time.log;
cd /Data/backupdata/rman1;
echo ' ' >> //Data/script/rman/rmanlog/'rman1.'$rmanedate'.log';echo 'RMAN backup file size(M): '`du -h` >> /Data/script/rman/rmanlog/'rman1.'$rmanbdate'.log';
echo 'Finish backup  at:'$rmanedate >> /Data/script/rman/rmanlog/'rman1.'$rmanedate'.log';mv  /Data/script/rman/rmanlog/'rman1.'$rmanbdate'.log' /Data/script/rman/rmanlog/'rman1.'$rmanbdate'.'$rmanedate'.log';

#ftp rman log to 192.168.10.12
cd /Data/script/rman/rmanlog
ftp -n -i <open 192.168.10.12
user administrator   password

bin

cd  backuplog
mput *
bye
EOF

接受日志的主机要有安装ftp,且ftp的目录是backuplog

 


 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23757700/viewspace-695049/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-09-17

  • 博文量
    163
  • 访问量
    356949