在Oracle用户下的定时器设置
[oracle@SHARKDB dbscripts]$ crontab -l
# minute hour day month week
15 1 * * 0 sh /home/oracle/dbscripts/backup_full.sh
05 3 * * * sh /home/oracle/dbscripts/del_arc.sh
全备脚本 先配置保留时间窗口,配置备份目录和格式,然后交叉检查所有备份集.
删除无效备份集,删除过期对象,进行全备份并压缩..
[oracle@SHARKDB dbscripts]$ cat backup_full.sh
#!/bin/ksh
source ~/.bash_profile
echo "------------------Start------------------";date
#backup start
$ORACLE_HOME/bin/rman log=/home/oracle/dbscripts/logs/rman_full_backup.log > /home/oracle/dbscripts/logs/del_arch`date +%F_%H`.log
$ORACLE_HOME/bin/rman target /