1.备份分为:物理备份和逻辑备份
物理备份:备份数据文件 控制文件 归档日志文件
逻辑备份:EXP EXPDP备份等
物理备份为主,逻辑做补充
2.错误的类型
media failure :介质失败.磁盘不能读写
user error: 操作错误
application error:应用程序错误
3.备份的方式
RMAN :RMAN备份
User managed backup :用户手工备份
4. 关于RMAN备份的一些东西
Incremental backups :只备份用过的块,在恢复的时候只使用这些块对应的redo
Block media recovery :可以只修复某些块而不是整个数据文件,命令recover block
Binary compression :减少备份所占的空间
Encrypted backups :加密备份,必须有advance security操作(?).如果是加密备份到磁带,则需要Oracle Secure Backup SBT实例(?)不再需要advance security
Automated database duplication :复制数据库,可以使用不同的存储结构,可以在ASM间复制
Cross-platform data conversion :跨平台的转换数据
5.不同的备份区别
Table 1-1 Feature Comparison of Backup Techniques
Feature | Recovery Manager | User-Managed | Data Pump Export |
---|---|---|---|
Closed database backups |
Supported. Requires instance to be mounted. |
Supported. |
Not supported. |
Open database backups |
Supported. No need to use BEGIN /END BACKUP statements.
|
Supported. Must use BEGIN /END BACKUP statements.
|
Requires rollback or undo segments to generate consistent backups. |
Incremental backups |
Supported. |
Not supported. |
Not supported. |
Corrupt block detection |
Supported. Identifies corrupt blocks and logs in V$DATABASE_BLOCK_CORRUPTION .
|
Not supported. |
Supported. Identifies corrupt blocks in the export log. |
Automatic specification of files to include in a backup(备份信息) |
Supported. Establishes the name and locations of all files to be backed up (whole database, tablespaces, data files, control files, and so on). |
Not supported. Files to be backed up must be located and copied manually. |
Not applicable. |
Backup repository |
Supported. Backups are recorded in the control file, which is the main repository of RMAN metadata. Additionally, you can store this metadata in a recovery catalog, which is a schema in a different database. |
Not supported. DBA must keep own records of backups. |
Not supported. |
Backups to a media manager |
Supported. Interfaces with a media manager. RMAN also supports proxy copy, a feature that allows a media manager to manage completely the transfer of data between disk and backup media. |
Supported. Backup to tape is manual or controlled by a media manager.(需要手动或备份管理器) |
Not supported. |
Backup of initialization parameter file |
Supported. |
Supported. |
Not supported. |
Backup of password and networking files |
Not supported. |
Supported. |
Not supported. |
Platform-independent language for backups(平台依赖的语言?) |
Supported. |
Not supported. |
Supported. |
5.FLASHBACK(闪回)
1)逻辑的闪回:
除了flashback drop外,其它的闪回技能需要使用undo表空间的信息
有以下几种逻辑闪回方式 :
Oracle Flashback Query:闪回查询. as to timestamp....
Oracle Flashback Version Query:闪回版本查询.在特定时间段内行的所有版本,包括start and end time, operation, and transaction ID等
Oracle Flashback Transaction Query:闪回事务查询.查询一个事务或一段时间内的所有事务做的更改
Oracle Flashback Transaction :闪回事务.把事务闪回,并且把依赖的事务也闪回,就像这些事务没有做过一样.
Oracle Flashback Drop :表删除闪回.从回收站把表还原
flashback data archive :通过补充日志,把表的更改记录下来.补充日志放在表空间中.数据库自动删除过期的闪回归档.
2)数据库闪回
将数据库闪回到某个SCN,有点像POINT-IN-TIME-RECOVER(基于时间点的恢复),但经PITR快,不需要用备份还原,所使用的的redo也比较少.ORACLE使用flashback log(闪回日志)来获取
数据块的历史版本和日志信息.闪回日志放在fast recover area(快速闪回区),默认不开启FRA(在DBCA创建数据库时可以配置).
ORACLE在FLASHBACK和BACK AND RESOTRE上支持还原点.还原点(restore point)对应一个SCN.可以任何时候创建还原点,可以将数据库闪回到某个已经存在的还原点上.
6.DATA RECOVERY ADVISOR(DRA数据恢复顾问)
DAR自动诊断数据库错误(如文件丢失),并且生成恢复建议.可以使用EM或GRID CONTROL或RMAN命令来使用DRA.DRA会显示错误的严重程度,critical, high, or low.DRA生成的建议包括data file restore and recovery, media recovery, Flashback Database等.在修复完成后,DRA会删除错误提示.DAR使用的顺序为list failure-advisor failure-repair failure
7.Backup and Recovery Documentation Roadmap(恢复备份的文档路径图)
官方文档备份指南一 Introduction to Backup and Recovery