Here I have backups that go backup more then 4 months :
RMAN> list backup summary; List of Backups =============== Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag ------- -- -- - ----------- --------------- ------- ------- ---------- --- 1 B A A DISK 01-JAN-12 1 1 YES TAG20120101T110005 2 B A A DISK 01-JAN-12 1 1 YES TAG20120101T110005 3 B F A DISK 01-JAN-12 1 1 YES TAG20120101T110008 4 B F A DISK 01-JAN-12 1 1 YES TAG20120101T110008 5 B A A DISK 01-JAN-12 1 1 YES TAG20120101T110205 6 B A A DISK 01-JAN-12 1 1 YES TAG20120101T112514 7 B A A DISK 01-JAN-12 1 1 YES TAG20120101T112514 8 B F A DISK 01-JAN-12 1 1 YES TAG20120101T112516 9 B F A DISK 01-JAN-12 1 1 YES TAG20120101T112516 10 B F A DISK 01-JAN-12 1 1 YES TAG20120101T112516 11 B F A DISK 01-JAN-12 1 1 YES TAG20120101T112516 12 B A A DISK 01-JAN-12 1 1 YES TAG20120101T112655 13 B F A DISK 01-JAN-12 1 1 NO TAG20120101T115229 14 B F A DISK 13-FEB-12 1 1 NO TAG20120213T234617 15 B A A DISK 23-MAR-12 1 1 YES TAG20120323T231436 16 B A A DISK 23-MAR-12 1 1 YES TAG20120323T231436 17 B A A DISK 23-MAR-12 1 1 YES TAG20120323T231436 18 B F A DISK 23-MAR-12 1 1 YES TAG20120323T231454 19 B A A DISK 23-MAR-12 1 1 YES TAG20120323T231639 20 B F A DISK 23-MAR-12 1 1 NO TAG20120323T231640 21 B F A DISK 23-MAR-12 1 1 YES TAG20120323T235528 22 B F A DISK 23-MAR-12 1 1 NO TAG20120323T235653 23 B F A DISK 24-MAR-12 1 1 NO TAG20120324T001027 24 B F A DISK 24-MAR-12 1 1 NO TAG20120324T001527 25 B F A DISK 24-MAR-12 1 1 NO TAG20120324T001528 RMAN>And the backups are located in the FRA (what can you surmise about the 13-FEB backup that doesn't exist here ?)
[oracle@linux64 backupset]$ pwd /home/oracle/app/oracle/flash_recovery_area/ORCL/backupset [oracle@linux64 backupset]$ ls -l total 12 drwxrwx--- 2 oracle oracle 4096 Jan 1 11:26 2012_01_01 drwxrwx--- 2 oracle oracle 4096 Mar 23 23:55 2012_03_23 drwxrwx--- 2 oracle oracle 4096 Mar 24 00:15 2012_03_24 [oracle@linux64 backupset]$ [oracle@linux64 backupset]$ du -sh * 1.1G 2012_01_01 1.1G 2012_03_23 1.3M 2012_03_24 [oracle@linux64 backupset]$What if one of the backups was relocated to another mountpoint ?
[oracle@linux64 backupset]$ mv 2012_01_01 /newmountpoint/FRA [oracle@linux64 backupset]$ du -sh /newmountpoint/FRA/* 1.1G /newmountpoint/FRA/2012_01_01 [oracle@linux64 backupset]$ RMAN> crosscheck backup; allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=195 device type=DISK crosschecked backup piece: found to be 'EXPIRED' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_annnn_TAG20120101T110005_7hzm1p3b_.bkp RECID=1 STAMP=771418806 crosschecked backup piece: found to be 'EXPIRED' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_annnn_TAG20120101T110005_7hzm1q6l_.bkp RECID=2 STAMP=771418807 crosschecked backup piece: found to be 'EXPIRED' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_nnndf_TAG20120101T110008_7hzm1rj9_.bkp RECID=3 STAMP=771418808 crosschecked backup piece: found to be 'EXPIRED' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_ncnnf_TAG20120101T110008_7hzm5dob_.bkp RECID=4 STAMP=771419318 crosschecked backup piece: found to be 'EXPIRED' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_annnn_TAG20120101T110205_7hzm5g23_.bkp RECID=5 STAMP=771419318 crosschecked backup piece: found to be 'EXPIRED' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_annnn_TAG20120101T112514_7hznjtnr_.bkp RECID=6 STAMP=771420314 crosschecked backup piece: found to be 'EXPIRED' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_annnn_TAG20120101T112514_7hznjvr1_.bkp RECID=7 STAMP=771420315 crosschecked backup piece: found to be 'EXPIRED' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_nnndf_TAG20120101T112516_7hznjx24_.bkp RECID=8 STAMP=771420317 crosschecked backup piece: found to be 'EXPIRED' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_nnndf_TAG20120101T112516_7hznm84k_.bkp RECID=9 STAMP=771420392 crosschecked backup piece: found to be 'EXPIRED' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_nnndf_TAG20120101T112516_7hznmq8q_.bkp RECID=10 STAMP=771420407 crosschecked backup piece: found to be 'EXPIRED' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_nnndf_TAG20120101T112516_7hznmydw_.bkp RECID=11 STAMP=771420414 crosschecked backup piece: found to be 'EXPIRED' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_annnn_TAG20120101T112655_7hznmzlq_.bkp RECID=12 STAMP=771420415 ..... some lines deleted .... crosschecked backup piece: found to be 'AVAILABLE' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_03_23/o1_mf_annnn_TAG20120323T231436_7ps4tww3_.bkp RECID=15 STAMP=778720476 crosschecked backup piece: found to be 'AVAILABLE' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_03_23/o1_mf_annnn_TAG20120323T231436_7ps4txz4_.bkp RECID=16 STAMP=778720477 crosschecked backup piece: found to be 'AVAILABLE' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_03_23/o1_mf_annnn_TAG20120323T231436_7ps4vf2f_.bkp RECID=17 STAMP=778720493 crosschecked backup piece: found to be 'AVAILABLE' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_03_23/o1_mf_nnndf_TAG20120323T231454_7ps4vgmf_.bkp RECID=18 STAMP=778720494 crosschecked backup piece: found to be 'AVAILABLE' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_03_23/o1_mf_annnn_TAG20120323T231639_7ps4yqqm_.bkp RECID=19 STAMP=778720599 crosschecked backup piece: found to be 'AVAILABLE' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/autobackup/2012_03_23/o1_mf_n_778720600_7ps4ys8j_.bkp RECID=20 STAMP=778720601 crosschecked backup piece: found to be 'AVAILABLE' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_03_23/o1_mf_nnndf_TAG20120323T235528_7ps77jf2_.bkp RECID=21 STAMP=778722928 crosschecked backup piece: found to be 'AVAILABLE' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/autobackup/2012_03_23/o1_mf_n_778723013_7ps7b5l1_.bkp RECID=22 STAMP=778723013 crosschecked backup piece: found to be 'AVAILABLE' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/autobackup/2012_03_24/o1_mf_n_778723827_7ps83mpw_.bkp RECID=23 STAMP=778723827 crosschecked backup piece: found to be 'AVAILABLE' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_03_24/o1_mf_nnndf_TAG20120324T001527_7ps8dzm8_.bkp RECID=24 STAMP=778724127 crosschecked backup piece: found to be 'AVAILABLE' backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/autobackup/2012_03_24/o1_mf_n_778724128_7ps8f0o8_.bkp RECID=25 STAMP=778724128 Crosschecked 25 objects RMAN> RMAN> delete expired backup; using channel ORA_DISK_1 List of Backup Pieces BP Key BS Key Pc# Cp# Status Device Type Piece Name ------- ------- --- --- ----------- ----------- ---------- 1 1 1 1 EXPIRED DISK /home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_annnn_TAG20120101T110005_7hzm1p3b_.bkp 2 2 1 1 EXPIRED DISK /home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_annnn_TAG20120101T110005_7hzm1q6l_.bkp 3 3 1 1 EXPIRED DISK /home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_nnndf_TAG20120101T110008_7hzm1rj9_.bkp 4 4 1 1 EXPIRED DISK /home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_ncnnf_TAG20120101T110008_7hzm5dob_.bkp 5 5 1 1 EXPIRED DISK /home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_annnn_TAG20120101T110205_7hzm5g23_.bkp 6 6 1 1 EXPIRED DISK /home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_annnn_TAG20120101T112514_7hznjtnr_.bkp 7 7 1 1 EXPIRED DISK /home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_annnn_TAG20120101T112514_7hznjvr1_.bkp 8 8 1 1 EXPIRED DISK /home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_nnndf_TAG20120101T112516_7hznjx24_.bkp 9 9 1 1 EXPIRED DISK /home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_nnndf_TAG20120101T112516_7hznm84k_.bkp 10 10 1 1 EXPIRED DISK /home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_nnndf_TAG20120101T112516_7hznmq8q_.bkp 11 11 1 1 EXPIRED DISK /home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_nnndf_TAG20120101T112516_7hznmydw_.bkp 12 12 1 1 EXPIRED DISK /home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_annnn_TAG20120101T112655_7hznmzlq_.bkp Do you really want to delete the above objects (enter YES or NO)? YES deleted backup piece backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_annnn_TAG20120101T110005_7hzm1p3b_.bkp RECID=1 STAMP=771418806 deleted backup piece backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_annnn_TAG20120101T110005_7hzm1q6l_.bkp RECID=2 STAMP=771418807 deleted backup piece backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_nnndf_TAG20120101T110008_7hzm1rj9_.bkp RECID=3 STAMP=771418808 deleted backup piece backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_ncnnf_TAG20120101T110008_7hzm5dob_.bkp RECID=4 STAMP=771419318 deleted backup piece backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_annnn_TAG20120101T110205_7hzm5g23_.bkp RECID=5 STAMP=771419318 deleted backup piece backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_annnn_TAG20120101T112514_7hznjtnr_.bkp RECID=6 STAMP=771420314 deleted backup piece backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_annnn_TAG20120101T112514_7hznjvr1_.bkp RECID=7 STAMP=771420315 deleted backup piece backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_nnndf_TAG20120101T112516_7hznjx24_.bkp RECID=8 STAMP=771420317 deleted backup piece backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_nnndf_TAG20120101T112516_7hznm84k_.bkp RECID=9 STAMP=771420392 deleted backup piece backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_nnndf_TAG20120101T112516_7hznmq8q_.bkp RECID=10 STAMP=771420407 deleted backup piece backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_nnndf_TAG20120101T112516_7hznmydw_.bkp RECID=11 STAMP=771420414 deleted backup piece backup piece handle=/home/oracle/app/oracle/flash_recovery_area/ORCL/backupset/2012_01_01/o1_mf_annnn_TAG20120101T112655_7hznmzlq_.bkp RECID=12 STAMP=771420415 Deleted 12 EXPIRED objects RMAN> RMAN> list backup summary; List of Backups =============== Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag ------- -- -- - ----------- --------------- ------- ------- ---------- --- 13 B F A DISK 01-JAN-12 1 1 NO TAG20120101T115229 14 B F A DISK 13-FEB-12 1 1 NO TAG20120213T234617 15 B A A DISK 23-MAR-12 1 1 YES TAG20120323T231436 16 B A A DISK 23-MAR-12 1 1 YES TAG20120323T231436 17 B A A DISK 23-MAR-12 1 1 YES TAG20120323T231436 18 B F A DISK 23-MAR-12 1 1 YES TAG20120323T231454 19 B A A DISK 23-MAR-12 1 1 YES TAG20120323T231639 20 B F A DISK 23-MAR-12 1 1 NO TAG20120323T231640 21 B F A DISK 23-MAR-12 1 1 YES TAG20120323T235528 22 B F A DISK 23-MAR-12 1 1 NO TAG20120323T235653 23 B F A DISK 24-MAR-12 1 1 NO TAG20120324T001027 24 B F A DISK 24-MAR-12 1 1 NO TAG20120324T001527 25 B F A DISK 24-MAR-12 1 1 NO TAG20120324T001528 RMAN>Apparently, Oracle is no longer "aware" of the 01-Jan-12 backup.
This is the problem statement : What if I were restoring an old backup (say 01-Jan) to another server but I did NOT have the controlfile that was part of the backup ? If I can use my media manager to restore the backup pieces from tape to disk (e.g. to the /newmountpoint/FRA filesystem), how can I restore the database without the controlfile ?
This is the "solution" :
(a) I restore a backup of the current controlfile (or any recent backup of the controlfile) to the new server.
(b) I then CATALOG all the backuppieces of 01-Jan that I have restored to disk.
(c) I can then RESTORE DATABASE --- even though the controlfile I am using is as of 08-May-12 and the backuppieces are from 01-Jan-12.
(d) I can RECOVER DATABASE to any point from 01-Jan to 08-May as long as I have (or can restore) the Archivelogs.
RMAN> catalog start with '/newmountpoint/FRA'; searching for all files that match the pattern /newmountpoint/FRA List of Files Unknown to the Database ===================================== File Name: /newmountpoint/FRA/2012_01_01/o1_mf_annnn_TAG20120101T110005_7hzm1q6l_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_annnn_TAG20120101T110205_7hzm5g23_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_nnndf_TAG20120101T112516_7hznm84k_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_nnndf_TAG20120101T112516_7hznjx24_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_annnn_TAG20120101T112514_7hznjtnr_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_nnndf_TAG20120101T112516_7hznmydw_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_annnn_TAG20120101T112514_7hznjvr1_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_ncnnf_TAG20120101T110008_7hzm5dob_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_annnn_TAG20120101T110005_7hzm1p3b_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_nnndf_TAG20120101T112516_7hznmq8q_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_nnndf_TAG20120101T110008_7hzm1rj9_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_annnn_TAG20120101T112655_7hznmzlq_.bkp Do you really want to catalog the above files (enter YES or NO)? YES cataloging files... cataloging done List of Cataloged Files ======================= File Name: /newmountpoint/FRA/2012_01_01/o1_mf_annnn_TAG20120101T110005_7hzm1q6l_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_annnn_TAG20120101T110205_7hzm5g23_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_nnndf_TAG20120101T112516_7hznm84k_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_nnndf_TAG20120101T112516_7hznjx24_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_annnn_TAG20120101T112514_7hznjtnr_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_nnndf_TAG20120101T112516_7hznmydw_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_annnn_TAG20120101T112514_7hznjvr1_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_ncnnf_TAG20120101T110008_7hzm5dob_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_annnn_TAG20120101T110005_7hzm1p3b_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_nnndf_TAG20120101T112516_7hznmq8q_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_nnndf_TAG20120101T110008_7hzm1rj9_.bkp File Name: /newmountpoint/FRA/2012_01_01/o1_mf_annnn_TAG20120101T112655_7hznmzlq_.bkp RMAN> list backup summary; List of Backups =============== Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag ------- -- -- - ----------- --------------- ------- ------- ---------- --- 13 B F A DISK 01-JAN-12 1 1 NO TAG20120101T115229 14 B F A DISK 13-FEB-12 1 1 NO TAG20120213T234617 15 B A A DISK 23-MAR-12 1 1 YES TAG20120323T231436 16 B A A DISK 23-MAR-12 1 1 YES TAG20120323T231436 17 B A A DISK 23-MAR-12 1 1 YES TAG20120323T231436 18 B F A DISK 23-MAR-12 1 1 YES TAG20120323T231454 19 B A A DISK 23-MAR-12 1 1 YES TAG20120323T231639 20 B F A DISK 23-MAR-12 1 1 NO TAG20120323T231640 21 B F A DISK 23-MAR-12 1 1 YES TAG20120323T235528 22 B F A DISK 23-MAR-12 1 1 NO TAG20120323T235653 23 B F A DISK 24-MAR-12 1 1 NO TAG20120324T001027 24 B F A DISK 24-MAR-12 1 1 NO TAG20120324T001527 25 B F A DISK 24-MAR-12 1 1 NO TAG20120324T001528 26 B A A DISK 01-JAN-12 1 1 YES TAG20120101T110005 27 B A A DISK 01-JAN-12 1 1 YES TAG20120101T110205 28 B F A DISK 01-JAN-12 1 1 YES TAG20120101T112516 29 B F A DISK 01-JAN-12 1 1 YES TAG20120101T112516 30 B A A DISK 01-JAN-12 1 1 YES TAG20120101T112514 31 B F A DISK 01-JAN-12 1 1 YES TAG20120101T112516 32 B A A DISK 01-JAN-12 1 1 YES TAG20120101T112514 33 B F A DISK 01-JAN-12 1 1 YES TAG20120101T110008 34 B A A DISK 01-JAN-12 1 1 YES TAG20120101T110005 35 B F A DISK 01-JAN-12 1 1 YES TAG20120101T112516 36 B F A DISK 01-JAN-12 1 1 YES TAG20120101T110008 37 B A A DISK 01-JAN-12 1 1 YES TAG20120101T112655 RMAN>
After using the CATALOG START WITH for the new location of the 01-Jan-12 backuppieces, I can now "see" the backup in RMAN. Therefore, I should also be able to restore this backup.
Questions :
1. What could be the 13-FEB-12 backup that doesn't appear in the directory but does appear in a LIST BACKUP SUMMARY ?
2. What could be the 01-JAN-12 backup that still appears even though I have moved all the backup pieces ? (Note : I have deleted a few line in the "crosscheck backup" output that are about these two "backups".
3. What differences could be present between the 01-Jan-12 backup and the current / latest controlfile that I am using ?
4. Can I use "CROSSCHECK BACKUP" with backuppieces on tape ? 5. What would the COMPLETION_TIME for the 01-JAN-12 Archivelogs in V$ARCCHIVED_LOG ?
.
.
.
Also see RMAN Tips 1, 2, 3
.
.
.
.
No comments:
Post a Comment