0

We just switched from using datapumps over to using incremental backups with RMAN. I've been having issues with the incremental backup pieces rolling forward. Here are my scripts for the backup:

BACKUP device type disk incremental level=1 tag='T4PRO' section size 1g database plus archivelog;
backup current controlfile format='&1CONTROLFILE_%T.BKP';

and the recover:

RECOVER COPY OF DATABASE WITH TAG 'T4PRO' UNTIL TIME 'SYSDATE-3';
DELETE NOPROMPT OBSOLETE DEVICE TYPE DISK;

Backup completes successfully, although the size of the backup copies seems larger than I had expected, but that's an aside for this discussion. My real issue is that we're on day 5 and are still getting this when I run the recover command:

RMAN> RECOVER COPY OF DATABASE WITH TAG 'T4PRO' UNTIL TIME 'SYSDATE-3';
Starting recover at 17-JAN-18
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=133 device type=DISK
no copy of datafile 1 found to recover
no copy of datafile 2 found to recover
no copy of datafile 3 found to recover
no copy of datafile 4 found to recover
no copy of datafile 5 found to recover
Finished recover at 17-JAN-18

RMAN> DELETE NOPROMPT OBSOLETE DEVICE TYPE DISK;
RMAN retention policy will be applied to the command
RMAN retention policy is set to recovery window of 7 days
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=133 device type=DISK
no obsolete backups found

The backup pieces are not rolling forward as I had expected them to two days ago. Here are the results of a SHOW ALL command if it provides any additional information:

RMAN> show all;
RMAN configuration parameters for database with db_unique_name T4PRO are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'C:\APP\ITWORKS\PRODUCT\11.2.0\DBHOME_1\D
ATABASE\SNCFT4PRO.ORA'; # default
Adam Blomeke
  • 113
  • 2
  • 10

1 Answers1

3

Check if datafile copies exist:

RMAN> LIST COPY OF DATABASE;

Check if datafile copies exist with TAG 'T4PRO':

RMAN> LIST COPY OF DATABASE TAG 'T4PRO';

You must take a "image" backup using BACKUP AS COPY... before you can recover that image with an incremental backup.

Thomas Fritsch
  • 9,639
  • 33
  • 37
  • 49
Raj Tiwari
  • 31
  • 1
  • I tried this. Given the way the files are laid out it makes more sense that it should work, but the restore command still failed. The level 0 backup now looks like this: `BACKUP AS COPY DEVICE TYPE DISK INCREMENTAL LEVEL=0 TAG='T4PRO' DATABASE;` – Adam Blomeke Jan 21 '18 at 04:18
  • comment didn't complete for some reason. The level 1 command is the following: `BACKUP DEVICE TYPE DISK INCREMENTAL LEVEL=1 FOR RECOVER OF COPY TAG='T4PRO' DATABASE PLUS ARCHIVELOG DELETE INPUT;` The recover command still produces the same output even on the fourth day even if you change it to 'sysdate-1' – Adam Blomeke Jan 21 '18 at 04:28