vrijdag 8 november 2013

RMAN How to recover incremental backup (DB in no archivelog mode)

Incremental backup



Maak Full backup level 0

via EM

Maak een incremental backup level 1


via EM 

Hier begint bugje in EM Grid. Er kan alleen een cumulative gemaakt worden via de schermen. Om Differential backup te maken moet gegenereerde rman script aangepast worden
.
Cumulative wijzigen in differential door cumulative te verwijderen

backup incremental level 1 cumulative device type sbt tag '%TAG' database;

wijzigen in

backup incremental level 1 device type sbt tag '%TAG' database;






Recovery van een incremtal backup


Wens is een restore naar de backup van 30 okt  genaamd BACKUP_JMT_INCREME_103013122621



Dit gaat niet via EM


Hoe restoren van controlfile

Log in rman.
Principe. Eerst controlfile restoren en dan de database. Belangrijkste is om te weten hoe de controlfile opgeslagen is in TSM.

set dbid=3400137432

shutdown immediate
startup nomount

RUN
 {
 ALLOCATE CHANNEL c1 DEVICE TYPE sbt_tape PARMS 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
 restore controlfile from 'c-3400137432-20131030-00';
 release channel c1;
 }

Info:
zoek naam control file op in logfiles van backup job EM BACKUP_JMT_INCREMENTAL1 en vind 'c-3400137432-20131030-00'

De controlfile van de backup

RMAN> backup incremental level 1 device type sbt tag 'BACKUP_JMT_INCREME_103013122621' database;
Starting backup at 30-OCT-13
allocated channel: ORA_SBT_TAPE_1
channel ORA_SBT_TAPE_1: SID=15 device type=SBT_TAPE
channel ORA_SBT_TAPE_1: Data Protection for Oracle: version 5.5.2.0
channel ORA_SBT_TAPE_1: starting incremental level 1 datafile backup set
channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
input datafile file number=00009 name=+DATA/jmt/datafile/ts_owbdm.278.828786663
input datafile file number=00003 name=+DATA/jmt/datafile/undotbs1.262.818339427
input datafile file number=00010 name=+DATA/jmt/datafile/ts_owbdv.273.828786707
input datafile file number=00016 name=+DATA/jmt/datafile/ts_afslag.270.829578065
input datafile file number=00005 name=+DATA/jmt/datafile/ts_owbsys.266.818502697
input datafile file number=00012 name=+DATA/jmt/datafile/ts_erisa.277.828786747
input datafile file number=00014 name=+DATA/jmt/datafile/ts_erisai.272.828786753
input datafile file number=00011 name=+DATA/jmt/datafile/ts_owbstg.276.828786743
input datafile file number=00006 name=+DATA/jmt/datafile/ts_owbsysi.267.818502869
input datafile file number=00001 name=+DATA/jmt/datafile/system.260.818339421
input datafile file number=00002 name=+DATA/jmt/datafile/sysaux.261.818339423
input datafile file number=00015 name=+DATA/jmt/datafile/ts_import.271.828786957
input datafile file number=00007 name=+DATA/jmt/datafile/ts_owbsnps.268.818502883
input datafile file number=00008 name=+DATA/jmt/datafile/ts_owbalg.275.828786661
input datafile file number=00013 name=+DATA/jmt/datafile/ts_owbwf.274.818518375
input datafile file number=00004 name=+DATA/jmt/datafile/users.264.818339433
channel ORA_SBT_TAPE_1: starting piece 1 at 30-OCT-13
channel ORA_SBT_TAPE_1: finished piece 1 at 30-OCT-13
piece handle=0eonmuqf_1_1 tag=BACKUP_JMT_INCREME_103013122621 comment=API Version 2.0,MMS Version 5.5.2.0
channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:09:55
Finished backup at 30-OCT-13

Starting Control File and SPFILE Autobackup at 30-OCT-13
piece handle=c-3400137432-20131030-00 comment=API Version 2.0,MMS Version 5.5.2.0
Finished Control File and SPFILE Autobackup at 30-OCT-13


na restore controle file kan in RMAN database hersteld worden

 
alter database mount;

RUN
 {
    ALLOCATE CHANNEL c1 DEVICE TYPE sbt_tape PARMS 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
    RESTORE DATABASE ;
    RECOVER DATABASE NOREDO;
}

 ALTER DATABASE OPEN RESETLOGS;
RESULTAAT

RMAN> RUN
 {
    ALLOCATE CHANNEL c1 DEVICE TYPE sbt_tape PARMS 'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
    RESTORE DATABASE ;
    RECOVER DATABASE NOREDO;
}
2> 3> 4> 5> 6>
allocated channel: c1
channel c1: SID=12 device type=SBT_TAPE
channel c1: Data Protection for Oracle: version 5.5.2.0

Starting restore at 08-NOV-13

channel c1: starting datafile backup set restore
channel c1: specifying datafile(s) to restore from backup set
channel c1: restoring datafile 00001 to +DATA/jmt/datafile/system.260.818339421
channel c1: restoring datafile 00002 to +DATA/jmt/datafile/sysaux.261.818339423
channel c1: restoring datafile 00003 to +DATA/jmt/datafile/undotbs1.262.818339427
channel c1: restoring datafile 00004 to +DATA/jmt/datafile/users.264.818339433
channel c1: restoring datafile 00005 to +DATA/jmt/datafile/ts_owbsys.266.818502697
channel c1: restoring datafile 00006 to +DATA/jmt/datafile/ts_owbsysi.267.818502869
channel c1: restoring datafile 00007 to +DATA/jmt/datafile/ts_owbsnps.268.818502883
channel c1: restoring datafile 00008 to +DATA/jmt/datafile/ts_owbalg.275.828786661
channel c1: restoring datafile 00009 to +DATA/jmt/datafile/ts_owbdm.278.828786663
channel c1: restoring datafile 00010 to +DATA/jmt/datafile/ts_owbdv.273.828786707
channel c1: restoring datafile 00011 to +DATA/jmt/datafile/ts_owbstg.276.828786743
channel c1: restoring datafile 00012 to +DATA/jmt/datafile/ts_erisa.277.828786747
channel c1: restoring datafile 00013 to +DATA/jmt/datafile/ts_owbwf.274.818518375
channel c1: restoring datafile 00014 to +DATA/jmt/datafile/ts_erisai.272.828786753
channel c1: restoring datafile 00015 to +DATA/jmt/datafile/ts_import.271.828786957
channel c1: restoring datafile 00016 to +DATA/jmt/datafile/ts_afslag.270.829578065
channel c1: reading from backup piece 0aonk778_1_1
channel c1: piece handle=0aonk778_1_1 tag=BACKUP_JMT_LEVEL_0_102913113118
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 01:07:51
Finished restore at 08-NOV-13

Starting recover at 08-NOV-13
channel c1: starting incremental datafile backup set restore
channel c1: specifying datafile(s) to restore from backup set
destination for restore of datafile 00001: +DATA/jmt/datafile/system.260.818339421
destination for restore of datafile 00002: +DATA/jmt/datafile/sysaux.261.818339423
destination for restore of datafile 00003: +DATA/jmt/datafile/undotbs1.262.818339427
destination for restore of datafile 00004: +DATA/jmt/datafile/users.264.818339433
destination for restore of datafile 00005: +DATA/jmt/datafile/ts_owbsys.266.818502697
destination for restore of datafile 00006: +DATA/jmt/datafile/ts_owbsysi.267.818502869
destination for restore of datafile 00007: +DATA/jmt/datafile/ts_owbsnps.268.818502883
destination for restore of datafile 00008: +DATA/jmt/datafile/ts_owbalg.275.828786661
destination for restore of datafile 00009: +DATA/jmt/datafile/ts_owbdm.278.828786663
destination for restore of datafile 00010: +DATA/jmt/datafile/ts_owbdv.273.828786707
destination for restore of datafile 00011: +DATA/jmt/datafile/ts_owbstg.276.828786743
destination for restore of datafile 00012: +DATA/jmt/datafile/ts_erisa.277.828786747
destination for restore of datafile 00013: +DATA/jmt/datafile/ts_owbwf.274.818518375
destination for restore of datafile 00014: +DATA/jmt/datafile/ts_erisai.272.828786753
destination for restore of datafile 00015: +DATA/jmt/datafile/ts_import.271.828786957
destination for restore of datafile 00016: +DATA/jmt/datafile/ts_afslag.270.829578065
channel c1: reading from backup piece 0eonmuqf_1_1
channel c1: piece handle=0eonmuqf_1_1 tag=BACKUP_JMT_INCREME_103013122621
channel c1: restored backup piece 1
channel c1: restore complete, elapsed time: 00:02:15

Finished recover at 08-NOV-13
released channel: c1



 

Geen opmerkingen:

Een reactie posten