2017-06-23 49 views
0

我在运行在Windows环境下的Oracle 11gR2测试数据库机器上配置了RMAN增量备份。我已将保留策略设置为7天的恢复窗口。周日我采取零级增量备份,如下所示:使用RMAN增量备份的保留策略

run { 
    HOST 'create_date_folder'; 
    allocate channel ch1 device type disk format 'F:\RMAN_BACKUPS\Database\%T\rman_0LVL_%d_s%s_p%p_t%t_%U'; 
    allocate channel ch2 device type disk format 'F:\RMAN_BACKUPS\Database\%T\rman_0LVL_%d_s%s_p%p_t%t_%U'; 
    allocate channel ch3 device type disk format 'F:\RMAN_BACKUPS\Database\%T\rman_0LVL_%d_s%s_p%p_t%t_%U'; 
    BACKUP INCREMENTAL LEVEL 0 AS COMPRESSED BACKUPSET DATABASE PLUS ARCHIVELOG; 
    release channel ch1; 
    release channel ch2; 
    release channel ch3; 
    } 

在一周几天我拿1级累积增量备份操作如下:

run { 
    HOST 'create_date_folder'; 
    allocate channel ch1 device type disk format 'F:\RMAN_BACKUPS\Database\%T\rman_1LVL_%d_s%s_p%p_t%t_%U'; 
    allocate channel ch2 device type disk format 'F:\RMAN_BACKUPS\Database\%T\rman_1LVL_%d_s%s_p%p_t%t_%U'; 
    allocate channel ch3 device type disk format 'F:\RMAN_BACKUPS\Database\%T\rman_1LVL_%d_s%s_p%p_t%t_%U'; 
    BACKUP INCREMENTAL LEVEL 1 AS COMPRESSED BACKUPSET CUMULATIVE DATABASE PLUS ARCHIVELOG; 
    release channel ch1; 
    release channel ch2; 
    release channel ch3; 
    } 

是我面临的问题是尽管设置了保留策略旧备份(超过两周)并未被RMAN视为过时/过期,因为它们不会通过执行delete obsolete命令而被删除。第二个问题是如何限制RMAN不删除Oracle生成的Archivelogs。 Pl指南。

回答

0

请您打印SHOW ALL rman命令的内容。

如果你是FRA,请执行select * from V $ RECOVERY_FILE_DEST;

对于第二个问题,它取决于您为rman ARCHIVELOG DELETION POLICY配置参数设置了什么,以及您是否使用FRA或NO。