ORACLE 10g备份(会自动删除截止到备份时所有的archivelog)
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;
原文链接:https://www.f2er.com/oracle/209278.html