9.2.0/dbs/06gupkfh_1_1 recid=6 stamp=569168369
Deleted 1 EXPIRED objects
小结一下,expired 就是无效的,没用的备份,rman是无法利用这些备份进行恢复的。
3、搞明白obsolete
看文档上说是超出备份保持策略的备份,看来主要目的是及时的删除不需要的备份,释放磁盘空间。
作了3次backup tablespace tools,保持策略设为2,看看report 的结果
IXDBA.NET社区论坛
RMAN> report obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
Report of obsolete backups and copies
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 5 16-SEP-05
Backup Piece 5 16-SEP-05 /u01/oracle/porduct/9.2.0/dbs/c-1862890406-20050916-03
Backup Set 7 16-SEP-05
Backup Piece 7 16-SEP-05 /u01/oracle/porduct/9.2.0/dbs/c-1862890406-20050916-04
Backup Set 8 16-SEP-05
Backup Piece 8 16-SEP-05 /u01/oracle/porduct/9.2.0/dbs/08gupn4k_1_1
Backup Set 9 16-SEP-05
Backup Piece 9 16-SEP-05 /u01/oracle/porduct/9.2.0/dbs/c-1862890406-20050916-05
Datafile Copy 5 16-SEP-05 /share/5.dbf
删除多余的备份,
RMAN> delete obsolete;
RMAN retention policy will be applied to the command
RMAN retention policy is set to redundancy 2
using channel ORA_DISK_1
using channel ORA_DISK_2
Deleting the following obsolete backups and copies:
Type Key Completion Time Filename/Handle
-------------------- ------ ------------------ --------------------
Backup Set 5 16-SEP-05
Backup Piece 5 16-SEP-05 /u01/oracle/porduct/9.2.0/dbs/c-1862890406-20050916-03
Backup Set 7 16-SEP-05
Backup Piece 7 16-SEP-05 /u01/oracle/porduct/9.2.0/dbs/c-1862890406-20050916-04
Backup Set 8 16-SEP-05
Backup Piece 8 16-SEP-05 /u01/oracle/porduct/9.2.0/dbs/08gupn4k_1_1
Backup Set 9 16-SEP-05
Backup Piece 9 16-SEP-05 /u01/oracle/porduct/9.2.0/dbs/c-1862890406-20050916-05
Datafile Copy 5 16-SEP-05 /share/5.dbf
Do you really want to delete the above objects (enter YES or NO)? y
deleted backup piece
backup piece handle=/u01/oracle/porduct/9.2.0/dbs/c-1862890406-20050916-03 recid=5 stamp=569167415
deleted backup piece
backup piece handle=/u01/oracle/porduct/9.2.0/dbs/c-1862890406-20050916-04 recid=7 stamp=569168397
deleted backup piece
backup piece handle=/u01/oracle/porduct/9.2.0/dbs/08gupn4k_1_1 recid=8 stamp=569171092
deleted backup piece
backup piece handle=/u01/oracle/porduct/9.2.0/dbs/c-1862890406-20050916-05 recid=9 stamp=569171100
Deleted 4 objects
RMAN-06207: WARNING: 1 objects could not be deleted for DISK channel(s) due
RMAN-06208: to mismatched status. Use CROSSCHECK command to fix status
List of Mismatched objects
==========================
Object Type Filename/Handle
--------------- ---------------------------------------------------
Datafile Copy /share/5.dbf
[oracle@vm1 test]$ cd $ORACLE_HOME/dbs
[oracle@vm1 dbs]$ ls
0agupn5e_1_1 initdw.ora orapwtest.bak
0cgupn93_1_1 init.ora snapcf_test.f
c-1862890406-20050916-06 lkTEST spfiletest.ora
c-1862890406-20050916-07 orapwtest
这些备份已经不存在了,/share/5.dbf是之前手工删除的。
同样来试试时间策略的情况,先看看