标签:sse back tab sed dirname data exp acl ESS
#!/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
标签:sse back tab sed dirname data exp acl ESS
原文地址:https://www.cnblogs.com/lvhongwei/p/9277351.html