ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ORACLE RMAN备份策略

ORACLE RMAN备份策略

原创 Linux操作系统 作者:tomshenhao 时间:2011-09-11 10:21:53 0 删除 编辑
 

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 <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

connect target /
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;

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24751738/viewspace-707154/,如需转载,请注明出处,否则将追究法律责任。

下一篇: ORACLE Package
请登录后发表评论 登录
全部评论

注册时间:2011-07-14

  • 博文量
    260
  • 访问量
    398727