2022年linux环境下oracle备份脚本 .pdf

上传人:Che****ry 文档编号:27253572 上传时间:2022-07-23 格式:PDF 页数:3 大小:29.60KB
返回 下载 相关 举报
2022年linux环境下oracle备份脚本 .pdf_第1页
第1页 / 共3页
2022年linux环境下oracle备份脚本 .pdf_第2页
第2页 / 共3页
点击查看更多>>
资源描述

《2022年linux环境下oracle备份脚本 .pdf》由会员分享,可在线阅读,更多相关《2022年linux环境下oracle备份脚本 .pdf(3页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、#!/bin/sh source /home/oracle/.bash_profile $ORACLE_HOME/bin/rman EOF connect target / run allocate channel d1 type disk; allocate channel d2 type disk; allocate channel d3 type disk; allocate channel d4 type disk; backup full tag #!/bin/sh source /home/oracle/.bash_profile $ORACLE_HOME/bin/rman EOF

2、 connect target / run allocate channel d1 type disk; allocate channel d2 type disk; allocate channel d3 type disk; allocate channel d4 type disk; backup full tag dbfull format /archive/backup/full%u_%p_%c database; sql alter system archive log current; backup format /archive/backup/%T_arch_%s_%p arc

3、hivelog all delete input; release channel d1; release channel d2; release channel d3; release channel d4; list backup; exit; EOF echo -end-;date crontab 的格式:minutes|hours|day of month|month|day of week| 下面是在 CRONTAB里面的语句03 23 * * 0 /home/oracle/backupscript/b_fullbackup.sh 00 02 01 * * 上面是一个全 备份。下面是

4、一个一零级备份的脚本:source /home/oracle/.bash_profile $ORACLE_HOME/bin/rman EOF connect target / run allocate channel d1 type disk; allocate channel d2 type disk; allocate channel d3 type disk; 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 1 页,共 3 页 - - - - - - - - - allocat

5、e channel d4 type disk; backup incremental level 0 cumulative tag db0 format /home/oracle/backup/db0%u_%s_%p database; sql alter system archive log current; backup filesperset 4 archivelog all delete input; delete noprompt obsolete; release channel d1; release channel d2; release channel d3; release

6、 channel d4; list backup; crosscheck backup; delete noprompt expired backup; delete noprompt obsolete; exit; EOF echo -end-;date 下面是一个一级备份脚本:source /home/oracle/.bash_profile $ORACLE_HOME/bin/rman EOF connect target / run allocate channel d1 type disk; allocate channel d2 type disk; allocate channel

7、 d3 type disk; allocate channel d4 type disk; backup incremental level 1 cumulative tag db1 format /home/oracle/backup/db1%u_%s_%p database; sql alter system archive log current; backup filesperset 4 archivelog all delete input; delete noprompt obsolete; release channel d1; release channel d2; relea

8、se channel d3; release channel d4; list backup; crosscheck backup; delete noprompt expired backup; delete noprompt obsolete; 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 2 页,共 3 页 - - - - - - - - - exit; EOF echo -end-;date ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1; export ORACLE_HOME ORACLE_SID=orcl1; export ORACLE_SID rq= data+%m%d /u01/app/oracle/product/10.2.0/db_1/bin/exp system/oracle file=/bak/backup/exp$rq.dmp full=y 名师资料总结 - - -精品资料欢迎下载 - - - - - - - - - - - - - - - - - - 名师精心整理 - - - - - - - 第 3 页,共 3 页 - - - - - - - - -

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 高考资料

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁