oracle-shell备份

获取PAH写入脚本

cat /home/oracle/.bash_profile

编写脚本oadbbak.sh

PATH
backuptime=`date +%Y%m%d%H%M%S`
exp user/password file=/home/lixu/oabeifen$backuptime.dmp
find /home/lixu -mtime +30 -type f -name "*.dmp" | xargs rm -rf

crontab -e并导出日志

0 2 * * * /home/lixu/oadbbak.sh >/home/lixu/oadbbak.log 2>&1
posted @ 2019-11-21 09:25  kylingx  阅读(301)  评论(0编辑  收藏  举报