欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

对rman命令report obsolete的一点说明

程序员文章站 2022-04-05 16:21:41
...

之前误以为归档的备份集超过备份保留策略后,reportobsolete会报其过期.于是设置了备份冗余策略为1,备份两次归档,发起reportobsolete命令希望能看到过期的归档

之前误以为归档的备份集超过备份保留策略后,report obsolete 会报其过期.于是设置了备份冗余策略为1,美国服务器,备份两次归档,发起report obsolete 命令希望能看到过期的归档备份集,但结果却未显示该备份集obsolete,看来有必要好好研究下,于是有下文。

一 先看看report obsolete命令的官方说明


Lists full backups, data file copies, and archived redo log files recorded in the
RMAN repository that can be deleted because they are no longer needed The command works
in two steps:


For each data file that has been backed up, RMAN identifies the oldest full
backup, level 0 backup, or image copy that is not obsolete under the
retention policy. Any backup of the data file older than the one identified in
this step is considered obsolete.

Any archived redo log files and level 1 incremental backups that are older
than the oldest nonobsolete full backup are considered obsolete. These files
are obsolete because no full or level 0 backup exists to which they can be
applied. Incremental level 1 backups or archived redo log files are not
considered obsolete if they can be applied to nonobsolete level 0 or full
backups.

第一段:
report obsolete命令用于列出rman资料库中能够被删除的全备份、数据文件拷贝和归档日志记录。
report obsolete 命令有两个过程

第二段:
对数据文件备份的处理:对于每一个已经备份的数据文件,rman会在保留策略内标识出一个最老的的全数据备份或者0级别备份,如果其它任何数据文件备份比已标识的备份还老则再这一步直接认作obsolete

第三段
对归档日志文件或者增量备份处理:
首先应该有一个参照,这个参照就是保留策略内最老的非obsolete 全备份或者0级备份。
如果归档文件或者增量备份比标识的非obsolete且最老的full backup 还老,则视为obsolete。
如果归档文件或者增量备份能够被应用在一个非obsolete的全备份或者0级别备份,则归档及增量备份为非obsolete,反之则为obsolete。


二 验证

相关标签: report obsolete