Loss of all redologs scenario

oracle-11g-r2rman

I'm having this question regarding a restore scenario in RMAN:

A database is running in Archivelog mode. Full RMAN hot backups are taken, redologs are backed up with RMAN to tape. The application remains online while any backup is taken.

Enter this scenario:

01h30 Redologs are backed up to tape using RMAN

02h00 a Full backup starts

08h00 the Full backup ends (and it was 100% successfull)

08h05 ALL Redologs on disk, including multiplexed copies, are permanently lost. Additionally, one (1) regular datafile is lost.

Note the backup itself took a long time : assume that is normal. During that same time, there was activity (as stated above, the application was running), but there really was not much happening. Still, redologs were written in that period (the same redologs that were lost).

And this is the question I'm wondering now :
If we just restore the complete database, on purpose not specifying any time to restore to, it is correct to say the the restore will restore to a point in time, just after 02h00 ?

Best Answer

No.

The rman command 'BACKUP FULL ...' makes a backup of the datafiles but does not backup any archivelogs. If you want to backup archivlogs you have to make an archivlog backup too. This can be done by adding the 'PLUS ARCHIVLOG' clause to the 'BACKUP FULL' command or by issuing a 'BACKUP ARCHIVELOG' command after the 'BACKUP FULL' command.

Online backup of datafiles are useless if you do not have an archive log backup that covers the time of the online backup. If I understand your scenario description, you have lost all archivelogs/redologs that cover the time after 01:30 and you haven't yet made a backup of these archives. Then you can only restore the all datafiles from a backup finished before 01:30 (maybe in the previous night) and then apply all archivelogs from the beginning of this backup until 01:30. (I assume that you have a backup of all the archives generated in this period of time).

So you can recover the database until 01:30.

--

some consequences:
1 ) datafiles and archivelogs should be placed on different disks. If the data disk crashes you still have all archives even if you haven't backuped them to tape.
2) redo logs should not be placed only on data disks. Duplex them because they are so important. Place at least one copy to other disks than data disk.
3) backup your archive logs regularly. Even during other back operations like a long during fullbackup make the archivelog backup parallel to these operations.