分类: Oracle
2010-04-10 11:56:11
RMAN备份集保留策略配置命令列表:
configure retention policy clear;
configure retention policy to none;
configure retention policy to recovery window of xxx days;--注:其中xxx为天数,整数.
configure retention policy to redundancy xxx;--注:xxx为冗余度,整数
命令说明:
configure retention policy clear
将备份保留策略值设置为默认值,即:redundancy 1。
configure retention policy to none
将备份保留策略的值设置为none后,将禁用备份保留策略。RMAN此后不会将任何备份集或备份镜向标记为obsolete状态。
configure retention policy to recovery window of xxx days
xxx:指定数据库可以最大恢复到的过去的某一个时间点,单位:天数。即恢复时间段为[sysdate-xxx,current_time]。RMAN可以保证将数据库恢复到这个时间段内的任何时刻,同时,RMAN将保留可以用于这个时间段内任意时刻恢复所需要的所有备份集,其它的备份集将会被标志为obsolete状态。
configure retention policy to redundancy xxx;
此备份保留策略,使的RMAN可以保留每个数据文件或控制文件全备份的个数。
注意:
基于时间窗口和策略和基于冗余度的策略是互斥的,任何时间点只能使用其中的一种策略。
英文文档参考:
来源oracle86中文网
rman中Backup Retention Policies的一点疑问?
PHP code:
There are two mutually exclusive options for implementing a retention policy: redundancy and recovery window. If no retention policy is configured by the user, then the REPORT OBSOLETE andDELETE OBSOLETE commands use a default retention policy of REDUNDANCY 1.
To configure a retention policy based on a recovery window, use the following command:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW
To configure a retention policy based on redundancy, use the following command:
CONFIGURE RETENTION POLICY TO REDUNDANCY
You can also disable the retention policy completely, meaning that RMAN does not consider any backup to be obsolete. To do so, use the following command:
CONFIGURE RETENTION POLICY TO NONE;
1、大家通常选择上面那种保存策略?
2、如何理解下面这段话的第一步?
PHP code:
The REPORT OBSOLETE and DELETE OBSOLETE commands work in two steps:
For each datafile for which there are full backup, datafile copy, or level 0 incremental backups, RMAN identifies the oldest full or level 0 backup or copy that is not obsolete under the retention policy being tested. Any full backup, level 0 incremental backup, or datafile copy of a datafile older than the one identified in this step is considered obsolete.
Any archived logs and level 1 incremental backups that are older than the oldest non-obsolete full backup are then obsolete because there is no full or level 0 backup to which they can be applied.
1、
CONFIGURE RETENTION POLICY TO NONE;
然后自定义备份的保留时长。
OBSOLETE 是指那些无法使用的备份,比如:一个已经过时的单独的标空间或者数据文件的备份。
根据策略,日志可能被认为是OBSOLETE, 也可能不是。
2、
如果数据有要求保证恢复到一定时期之前,那么就采用 RECOVERY
WINDOW 比较合适。
如果数据只需要恢复到最新,或者备份空间窘迫 不能保留多个有效全备份,那采取 CONFIGURE RETENTION POLICY TO
REDUNDANCY
3、 应该还是要手动delete obsolete进行删除的,或者将其写到备份脚本里面
4、 delete obsolete 写到script 里面