This discussion is archived
5 Replies Latest reply: Mar 25, 2013 4:07 AM by mseberg RSS

rman backup recovery point in time

user10243788 Newbie
Currently Being Moderated
hi all,

Below are my rman backup script and rman configurations.
Because of size constraints i am backing up my archive logs through rman and deleting them.
I wanted to know if it was possible to go to a certain time using these archive logs.
ex:-
the script runs at 10:00 in the night everyday say it ran on 1st march and 2nd march , at 10:00 PM, if i want to recover till 2:00 PM on 2nd march, will the 2nd march backup be enough or i will need the backup of 1st march and archive logs till 2:00 PM for which i have to physcially backup archive logs everyday, along with rman.
RUN
{ 
  ALLOCATE CHANNEL ch1 DEVICE TYPE DISK;
  ALLOCATE CHANNEL ch2 DEVICE TYPE DISK;
  ALLOCATE CHANNEL ch3 DEVICE TYPE DISK;
  BACKUP DATABASE INCLUDE CURRENT CONTROLFILE format 'G:\Oracle\flash_recovery_area\TEST\BACKUPSET\tmp\rman_backup\df_%d_%s_%p_%T';
  DELETE NOPROMPT OBSOLETE;
  SQL "ALTER SYSTEM ARCHIVE LOG CURRENT";
  BACKUP ARCHIVELOG ALL DELETE INPUT format 'G:\Oracle\flash_recovery_area\TEST\BACKUPSET\tmp\rman_backup\arc_%d_%s_%p_%T';

}
RMAN configuration parameters for database with db_unique_name TEST are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
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 'G:\Oracle\flash
_recovery_area\TEST\BACKUPSET\tmp\RMAN_BACKUP\CTL_%F';
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 LOA
D TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'C:\ORACLE\PRODUCT\11.2.0\DBHOME_1\DATABA
SE\SNCFTEST.ORA'; # default
  • 1. Re: rman backup recovery point in time
    Hemant K Chitale Oracle ACE
    Currently Being Moderated
    For Recovery to the 2pm 02-Mar Point In Time, you will need
    a. The Database Backup that started at 10pm 01-Mar (the previous day)
    b. All the archivelogs from 10pm 01-Mar to 2pm 02-Mar.

    Some of the archivelogs for b. would have been included in the archivelog backup that was executed immediately after the database backup of 01-Mar. Subsequent archivelogs would still be on disk, as they wouldn't have been backed up yet. (Yes, you will need all the archivelogs, whether they are in backups or are present on disk).


    Hemant K Chitale
  • 2. Re: rman backup recovery point in time
    user10243788 Newbie
    Currently Being Moderated
    thank you hemanth,
    these backups are being in a tape, today if i resore backup taken at 10PM on 2nd march, wil i be able to restore it till 2:00 PM on 2nd march?
    as all the archives were backed up at 10 PM,
    so to do this, during restoration when i Register all the copied backup piecies in the controlfile,after restroring control file,

    I have to give something like below right?
    RMAN target /
    run { set until time "to_date('2013-03-02:10:00:00', 'yyyy-mm-dd:hh24:mi:ss')";;
     switch datafile all;
    recover database;
    }
  • 3. Re: rman backup recovery point in time
    Hemant K Chitale Oracle ACE
    Currently Being Moderated
    If the 02-Mar 10pm backup has already been executed and has done a DELETE INPUT .... then yes, you may choose to restore the archivelogs to 2pm from tape.

    A switch datafile all ? What for ? Don't you think you need to RESTORE DATABASE ? The database is on tape, the datafiles have to be restored from the tape backup. So you need

    SET UNTIL
    RESTORE DATABASE
    RESTORE ARCHIVELOG -- optional
    RECOVER DATABASE

    The RESTORE ARCHIVELOG itself is optional as RMAN, when executing the RECOVER DATABASE would automatically identify the required archivelogs and do a RESTORE ARCHIVELOG.

    Hemant K Chitale
  • 4. Re: rman backup recovery point in time
    user10243788 Newbie
    Currently Being Moderated
    thanks again hemanth,

    I can give something like below to restore till 9:00 AM when restoring 2nd March 10PM backup right?

    set until time "to_date('2013-03-02:09:00:00', 'yyyy-mm-dd:hh24:mi:ss')"
    RESTORE DATABASE
    RESTORE ARCHIVELOG -- optional
    RECOVER DATABASE
  • 5. Re: rman backup recovery point in time
    mseberg Guru
    Currently Being Moderated
    Hello;
    RMAN> startup mount
    RMAN> restore database until time "to_date('02-MAR-2013 09:00:00', dd-mon-rrrr hh24:mi:ss')";
    RMAN> recover database;
    RMAN> alter database open; 
    Best Regards

    mseberg

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points