linux平台的oracle11201借用expdp定时备份数据库 - Oracle-fans - 博客园
linux平台的oracle11201借用expdp定时备份数据库
备份脚本如下:
#!/bin/bash
export ORACLE_BASE=/data/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=orcl
export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH
source ~/.bash_profile
cd /disk01/db_back
rm -f `date +%w`.dmp
rm -f `date +%w`.log
expdp \'sys/xxxxxx@orcl as sysdba\' directory=ora_back dumpfile=`date +%w`.dmp logfile=`date +%w`.log schemas=xxx,xxx123
crontab任务如下:
[oracle@ryanoracle scripts]$ crontab -l
* 4 * * 1,4 sh /home/oracle/scripts/expdp.sh ----即 每周1 、周4 凌晨4点执行备份脚本
Copyright © 2021 Oracle-fans
Powered by .NET 5.0 on Kubernetes
创建时间:2021-09-15 17:49
넶浏览量:0
