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; (编辑:李大同)
【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!
|