Oracle 一周备份策略及备份脚本
周日:做0级的增量备份(是增量备份的基础备份),脚本如下:
文本如下:
#!/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
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341