加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Oracle 一周备份策略及备份脚本

发布时间:2020-12-12 18:48:29 所属栏目:百科 来源:网络整理
导读:650) this.width=650;" src="http://img.jb51.cc/vcimg/static/loading.png" title="备份策略.png" alt="wKioL1ihWHODf869AAEew1VPW5I962.png" src="https://s5.51cto.com/wyfs02/M00/8D/8B/wKioL1ihWHODf869AAEew1VPW5I962.png"> 周日:做0级的增量备份(是

wKioL1ihWHODf869AAEew1VPW5I962.png

周日:做0级的增量备份(是增量备份的基础备份),脚本如下:

wKiom1ihXPPClCocAACrJdfeN5Y107.png

文本如下:

#!/bin/bash

#Author:wangergui Date:2017-02-13 Email:291131893@qq.com

#Function Sunday Increment level 0 backup script

Current_day=$(date +%Y-%m-%d)

[[ ${USER} == "oracle" ]] || exit 2

[[ -d /u01/app/oracle/myrman ]] || mkdir -p /u01/app/oracle/myrman

rman target / <<EOF

run {

CONFIGURE CONTROLFILE AUTOBACKUP ON;

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F';


allocate channel c1 type disk;

allocate channel c2 type disk;

allocate channel c3 type disk;

allocate channel c4 type disk;

backup incremental level 0 database format '/u01/app/oracle/myrman/%d_%T_%s.bak' plus archivelog delete all input;


delete noprompt obsolete;


release channel c1;

release channel c2;

release channel c3;

release channel c4;

}

EOF

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读