This discussion is archived
4 Replies Latest reply: Aug 13, 2013 2:16 AM by user13005731 RSS

RMAN question on Restore points

user13005731 Newbie
Currently Being Moderated

Hi,

 

I'm on Oracle database 11.2.0.3. Currently, we've got RMAN scripts that do daily incremental and weekly/monthly full backups. My daily script is as below:

{
 allocate channel t1 type 'sbt_tape' parms 'ENV=(TDPO_usrFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.usr)';
 allocate channel t2 type 'sbt_tape' parms 'ENV=(TDPO_usrFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.usr)';
 allocate channel t3 type 'sbt_tape' parms 'ENV=(TDPO_usrFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.usr)';
 backup format 'prod_dailybackup_%d_%s_%t' incremental level 1 database;
 backup format 'prodarchbackup_%d_%s_%t' archivelog all not backed up 1 times;
 crosscheck backup;
 crosscheck archivelog all;
 delete noprompt obsolete;
 delete noprompt expired backup;
 delete noprompt expired archivelog all;
 report schema;
 release channel t1;
 release channel t2;
 release channel t3;
}

 

 

And the weekly backup script as below:

 

 

{
 allocate channel t1 type 'sbt_tape' parms 'ENV=(TDPO_usrFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.usr)';
 allocate channel t2 type 'sbt_tape' parms 'ENV=(TDPO_usrFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.usr)';
 allocate channel t3 type 'sbt_tape' parms 'ENV=(TDPO_usrFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.usr)';
 backup incremental level 0 format 'prod_weeklybackup_%d_%s_%t'  database;
 backup format 'prodarchbackup_%d_%s_%t' archivelog all not backed up 1 times;
 release channel t1;
 release channel t2;
 release channel t3;
}

 

My two questions are:

 

1. Can I add 'restore point' to the daily backup script, without including the 'keep until' clause?

2. Can I add a restore point with a name that's dynamically generated, for the weekly backup, for example: weekly_rest_point_13082013 , thus including the current date?

 

 

Regards

Dula

  • 1. Re: RMAN question on Restore points
    Hemant K Chitale Oracle ACE
    Currently Being Moderated

    The CREATE RESTORE POINT is a command from the SQLPlus command line.

     

    You must also ensure that your FRA has enough space to maintain Flashback logs.

     

    I presume that you will periodically discard (i.e. DROP) the Restore Points.

     

    Hemant K Chitale

  • 2. Re: RMAN question on Restore points
    user13005731 Newbie
    Currently Being Moderated

    Thanks a lot Hermant,

     

    Then what could be the best way to track the backupsets, so that it is easier to restore from a given backupset?

     

    With restore points, I could, for example,

    list restore point all

    then duplicate/restore from a restore point. If I want to achieve a similar effect, can, for example, backup tags come closer?

  • 3. Re: RMAN question on Restore points
    DK2010 Guru
    Currently Being Moderated

    Hi,

     

    1. Can I add 'restore point' to the daily backup script, without including the 'keep until' clause?

    i believe no, keep until is required field

     

    2. Can I add a restore point with a name that's dynamically generated, for the weekly backup, for example: weekly_rest_point_13082013 , thus including the current date?

    No you can not assign the dynamic name in restore point name.

    it should be like i.e

    
    RMAN> run {
    backup database TAG 'MY_BKP' keep UNTIL TIME "TO_DATE('18-AUG-2013','DD-MON-YYYY')"  RESTORE POINT MY_BKP_130813;
    }2> 3> 
    Starting backup at 13-AUG-13
    using channel ORA_DISK_1
    backup will be obsolete on date 18-AUG-13
    archived logs will not be kept or backed up
    channel ORA_DISK_1: starting full datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    input datafile file number=00002 name=/home/oracle/app/oracle/oradata/orcl/ddtest_sysaux01.dbf
    input datafile file number=00001 name=/home/oracle/app/oracle/oradata/orcl/ddtest_system01.dbf
    input datafile file number=00003 name=/home/oracle/app/oracle/oradata/orcl/ddtest_undotbs01.dbf
    input datafile file number=00004 name=/home/oracle/app/oracle/oradata/orcl/dd_users01.dbf
    channel ORA_DISK_1: starting piece 1 at 13-AUG-13
    channel ORA_DISK_1: finished piece 1 at 13-AUG-13
    piece handle=/home/oracle/RMAN/ddtest_l0_t823313030_s27_p1.rmn tag=MY_BKP comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:26
    using channel ORA_DISK_1
    backup will be obsolete on date 18-AUG-13
    archived logs will not be kept or backed up
    channel ORA_DISK_1: starting full datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    including current control file in backup set
    channel ORA_DISK_1: starting piece 1 at 13-AUG-13
    channel ORA_DISK_1: finished piece 1 at 13-AUG-13
    piece handle=/home/oracle/RMAN/ddtest_l0_t823313057_s28_p1.rmn tag=MY_BKP comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:02
    Finished backup at 13-AUG-13
    RMAN> alter database open;
    database opened
    RMAN> LIST RESTORE POINT ALL;
    SCN              RSP Time  Type       Time      Name
    ---------------- --------- ---------- --------- ----
    1111046                               13-AUG-13 MY_BKP_130813
  • 4. Re: RMAN question on Restore points
    user13005731 Newbie
    Currently Being Moderated

    Thanks a lot  DK2010, got it

Legend

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