Oracle Rman-备份脚本
来源:互联网 发布:发送短信的软件 编辑:程序博客网 时间:2024/05/22 14:42
oracle@dbservera ~]$ crontab -l
0 0 * * * /u01/rmanbak/rmanbak.sh > /u01/rmanbak/rmanbak.log 2>&1
[oracle@dbservera ~]$ cat /u01/rmanbak/rmanbak.sh
#!/bin/bash
. ~/.bash_profile
echo -------------------------start-----------------------;date
rman target/<<EOF
backup as compressed backupset database include current controlfile format '/u01/rman/rmanbak/full_%U.bak';
delete noprompt obsolete;
delete noprompt force archivelog all completed before 'sysdate-7';
exit;
EOF
echo -------------------------end-----------------------;date
0 0 * * * /u01/rmanbak/rmanbak.sh > /u01/rmanbak/rmanbak.log 2>&1
[oracle@dbservera ~]$ cat /u01/rmanbak/rmanbak.sh
#!/bin/bash
. ~/.bash_profile
echo -------------------------start-----------------------;date
rman target/<<EOF
backup as compressed backupset database include current controlfile format '/u01/rman/rmanbak/full_%U.bak';
delete noprompt obsolete;
delete noprompt force archivelog all completed before 'sysdate-7';
exit;
EOF
echo -------------------------end-----------------------;date
注意:EOF后面不要有空格,不然会有警告
总之一共三步,首先创建备份脚本,之后创建备份的目标目录(要注意目录权限),最后通过crontab -e -u oracle来编辑oracle的执行计划。
阅读全文
1 0
- Oracle RMAN备份脚本
- oracle rman备份脚本
- Oracle RMAN备份脚本
- oracle rman 备份脚本
- Oracle Rman-备份脚本
- oracle rman 备份数据库脚本
- oracle rman自动备份脚本
- Oracle RMAN数据库备份脚本
- oracle rman 定时备份脚本
- Oracle rman 自动备份脚本
- [Rman]Oracle Rman增量备份Level012脚本
- ORACLE RMAN备份的脚本配置
- Oracle数据库RMAN的自动备份脚本
- ORACLE 10G rman 备份脚本
- Oracle的RMAN备份与恢复脚本
- Oracle生产环境RMAN备份脚本
- Oracle的RMAN备份与恢复脚本
- Oracle的RMAN备份与恢复脚本
- adf4360-0和adf4360-4
- centos7 项目部署历程
- android获取帧保存到本地
- 马上就是圣诞节了,但是,没想到程序猿的圣诞节竟然是这样的?
- 数据库表基本操作
- Oracle Rman-备份脚本
- 收藏的文章
- 聊聊NB-iot等物联网技术适合你的项目吗?
- zTree在JAVA项目中的学习
- 【八中】字串距离
- 六、服务治理
- GridView设置Item的点击事件无效的解决方案
- 如何解决failed to push some refs to git
- Openshift cluster 搭建过程整理(含问题处理)