备份Oracle 数据库。
Posted Tooken
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了备份Oracle 数据库。相关的知识,希望对你有一定的参考价值。
#!/bin/bash
# 2018-07-07 oracle database back
#filename=`date +%Y%m%d`
filename=`date +%Y_%m_%d_%H%M`
dirname=`date +%Y_%m_%d`
bakpath=‘/u01/databak/‘
if [ ! -d ${bakpath}${dirname} ]
then
mkdir ${bakpath}${dirname}
fi
#mkdir ${bakpath}${dirname}
bakpath2=${bakpath}/${dirname}/
exp ccense/ccense file=${bakpath2}${filename}.dmp log=${bakpath2}${filename}.log
if [ $? -eq 0 ]
then
echo "###################################" 2>> ${bakpath2}${filename}.log
echo "backup oracle database is successed" 2>> ${bakpath2}${filename}.log
else
echo "###################################" 2>> ${bakpath2}${filename}.log
echo "backup oracle database is failed" 2>> ${bakpath2}${filename}.log
fi
以上是关于备份Oracle 数据库。的主要内容,如果未能解决你的问题,请参考以下文章