我在 Windows 环境下运行的 Oracle 11gR2 测试数据库机器上配置了 RMAN 增量备份。我已将保留政策设置为 7 天的恢复窗口。周日我进行零级增量备份,如下所示:
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 生成的存档日志。请指导。