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

ORACLE RMAN备份策略

发布时间:2020-12-12 14:56:49 所属栏目:百科 来源:网络整理
导读:ORACLE 10g备份(会自动删除截止到备份时所有的archivelog) 每周全备一次 保留30天可用的备份集; 控制文件自动备份; RHEL系统 1. RMAN设置: RMANconfigure controlfile autobackup on; RMANconfigure retention policy to recovery window of 30 days; 2.

ORACLE 10g备份(会自动删除截止到备份时所有的archivelog)

每周全备一次
保留30天可用的备份集;
控制文件自动备份;

RHEL系统
1. RMAN设置:
RMAN>configure controlfile autobackup on;
RMAN>configure retention policy to recovery window of 30 days;

2. 备份脚本:
$ORACLE_HOME/bin/rman <<EOF style="WORD-WRAP: break-word"
connect target /
backup as compressed backupset database include current controlfile plus archivelog delete input;
delete noprompt obsolete;
exit;
EOF

3. 修改crontab设置:
ORACLE$crontab -e
* * * * * 7 /路径/文件名 >/dev/null 2>&1

windows系统

1. RMAN设置:
RMAN>configure controlfile autobackup on;
RMAN>configure retention policy to recovery window of 30 days;

2. 备份脚本:

a. bat文件:

rem run rman

rman cmdfile=full_backup.txt

b. full_backup.txt

connecttarget /
backup as compressed backupset database include current controlfile plus archivelog delete input;
delete noprompt obsolete;
exit;

3. 计划任务设置:
控制面板/计划任务

ORACLE增量备份(会自动删除截止到备份时所有的archivelog)

备份脚本:

backup incremental level 0 database including current controlfile plus archivelog delete input; backup incremental level 1 database including current controlfile plus archivelog delete input;

(编辑:李大同)

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

    推荐文章
      热点阅读