cancel
Showing results for 
Search instead for 
Did you mean: 

Recovering data from a 'Duplicated' Tape copy

jwmcf1
Level 4

I am backing up a couple of Oracle databases to a disk storage unit and then I have the backup job duplicate to tape using disk staging. 

So my question is: In the event of a total disaster where I loose everything except my offsite tapes and I have to rebuild my NBU environment from the catalog backup, how do you go about recovering from the duplicated tapes?  Should I be able to recover the duplicated data from the tape back to disk? 

I have tried using Backup, Archive and Recover to find a way to recover the duplicated data from the tape copies to disk with no such luck.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions

J_H_Is_gone
Level 6

So you make a copy to disk

then dup that to tape

then you try to see if you can restore from that tape from the same master that made the disk and tape backup, and you cannot find it .... do I have this correct?

Your disk copy is your primary - then you dup it to tape which is your second copy.

When you try to do a restore (and in this case your master server is working and knows about both copies) it will always try to restore from the primary copy - in this case the disk copy.

To restore from this same master from the tape copy you would need to promote the tape to primary copy.

If the disk copy expires, the tape copy automatically becomes the primary.

If you lose your disk drive and you rebuild your database - if you don't have the disk backups any more - you may have to "clean" your database of those images because your database thinks they are still valid (that is more into catalog recovery stuff)

But it just comes down to - promote your tape to primary copy - or if you have to rebuild from scratch you can import the tapes, and it would be the only copy and would restore from the tape too.

View solution in original post

6 REPLIES 6

J_H_Is_gone
Level 6

So you make a copy to disk

then dup that to tape

then you try to see if you can restore from that tape from the same master that made the disk and tape backup, and you cannot find it .... do I have this correct?

Your disk copy is your primary - then you dup it to tape which is your second copy.

When you try to do a restore (and in this case your master server is working and knows about both copies) it will always try to restore from the primary copy - in this case the disk copy.

To restore from this same master from the tape copy you would need to promote the tape to primary copy.

If the disk copy expires, the tape copy automatically becomes the primary.

If you lose your disk drive and you rebuild your database - if you don't have the disk backups any more - you may have to "clean" your database of those images because your database thinks they are still valid (that is more into catalog recovery stuff)

But it just comes down to - promote your tape to primary copy - or if you have to rebuild from scratch you can import the tapes, and it would be the only copy and would restore from the tape too.

jwmcf1
Level 4

I think you have answered my question.

 In working out my disaster plan I am simply trying to put together the peices it would take to recover my Oracle data  in the event that my entire infrastucture is destroyed and all that I have left are these duplicated tapes that are stored off site.

So this is how I am understanding it.  After complete and utter destruction that I have somehow managed to escape, I am delt the task of having to recover this Oracle database from this one duplicated tape during the resulting chaos. 

High level:

1. build up a new NBU server, naming it exactly as the utterly destroyed one

2. restore my NBU database from the Recovery File that I email to an offsite account each night and from my offsite tapes that contain the catalog backups.

3. build up a new linux box and install a base Oracle install with a blank database and install and configure the NBU client to this new server.

4.add this new Oracle server as a client in NBU

5. configure NBU and the Oracle piece to allow for a redirected restore to the new blank Oracle database.

6. Gather the duplicated tape and then within NBU make the duplicated tape the primary copy as there is no longer a disk copy.

7.  Now have my database admin perform the restore and the duplicated tape copy will be used.

OR

1. build a new NBU machine, DONT recover the NBU catalog/database

2. Simply import the duplicated tape

3. then restore to the new oracle box

Stumpr2
Level 6

How to restore from a different copy of the backup

http://www.symantec.com/business/support/index?page=content&id=TECH64592

 

Problem


 

When trying to restore from a backup that has multiple copies, NetBackup will request the Primary Copy.  Unfortunately sometimes that media will not be available (possibly the tape is off site, or damaged).  It can therefore be necessary to restore from a tape that is not the Primary Copy.

Solution


There are several ways to restore from a backup that is not the primary copy, depending on which is most convenient for your environment:

1. You can restore via the command line and use the bprestore command with the -copy switch (from NetBackup Version 6.0 Maintenance Pack 5 (MP5) and onwards).
 
e.g to restore files from copy 2, which are backups of file1 that were performed between 04/01/2006 06:00:00 and 04/10/2006 18:00:00:
 
On UNIX:
/usr/openv/netbackup/bin/bprestore -copy 2 -s 04/01/06 06:00:00 -e 04/10/06 18:00:00 /usr/user1/file1
 
On Windows:
install_path\VERITAS\NetBackup\bin\bprestore  -copy 2 -s 04/01/06 06:00:00 -e 04/10/06 18:00:00 C:\user1\file1


2.  You can promote the copy you have to become the new primary copy
 
a) Via the Command line using the bpduplicate command with the -npc and -backupid switch:
 
e.g to restore files from copy 2, where the backup id is bob_1216710249
 
On UNIX:
/usr/openv/netbackup/bin/admincmd/bpduplicate -npc 2 -backupid bob_1216710249
 
On Windows:
install_path\VERITAS\NetBackup\bin\admincmd\bpduplicate -npc 2 -backupid bob_1216710249
 
b) Via the GUI:
1. Go to the Catalog section of the GUI.
2. Select 'verify' and the top right the copy number of the current image you wish to use.
3. For the Date/Time Range From: value, enter the Start Date: used in the Backup, Archive and Restore GUI
4. For the Date/Time Range To: value, enter the End Date: used in the Backup, Archive and Restore GUI
5. Click Search Now
6. Right click on image you wish to restore from and click 'Set primary copy'.
Now when you go back to Restore GUI you can restore as normal and it will default to this copy.
 
3.  If you have several images you wish to restore from alternate copies (for example in a disaster recovery situation), it is quicker to create the file ALT_RESTORE_COPY_NUMBER, which only contains the number of the copy you want to use. Once the file is in place, use the BAR GUI as normal, and it will use the copy number stored in this file.
 
On UNIX:
To restore using the NetBackup Administration console:
1. Create the following text file on the Master Server.
/usr/openv/netbackup/ALT_RESTORE_COPY_NUMBER
2. Enter the copy number to use as a single line of text within this file.
3. Remove the ".txt" extension from the file
4. Then restore from the Backup, Archive and Restore section of the NetBackup Administration console.

          5. Once the restore is complete then move or rename the ALT_RESTORE_COPY_NUMBER file so the primary copy will be used for all future restores.

 
 
On Windows:
To restore using the NetBackup Administration console:
1. Create the following text file on the Master Server.
<install_dir>\VERITAS\NetBackup\ALT_RESTORE_COPY_NUMBER
2. Enter the copy number to use as a single line of text within this file.
3. Remove the ".txt" extension from the file
4. Then restore from the Backup, Archive and Restore section of the NetBackup Administration console.
5. Once the restore is complete then move or rename the ALT_RESTORE_COPY_NUMBER file so the primary copy will be used for all future restores.


Note: Be sure to remove or rename the ALT_RESTORE_COPY_NUMBER file once the restore has completed. Failure to do this will result in the backup copy number listed in this file being used for all future restores. This can result in failures when the copy number does not exist or is not available for restore.

Also, when using this final option, if you attempt to preview which tape is required through the GUI, it will still show the primary copy's Media ID, however when the restore actually takes place it will request the tape containing the copy number specified

Marianne
Level 6
Partner    VIP    Accredited Certified

Do you have an RMAN Recovery catalog? If so, You will need to provide protection for this catalog as well (e.g. do cold NBU backup) and restore the recovery catalog before doing Oracle database restores.

Please mark JH's post as Solution...

jwmcf1
Level 4

AHh,  I am not sure.  How can I check to verify if I am using the RMAN recovery catalog?  And once I verify whether or not RMAN recovery catalog is used, how do I back this up?

thanks!  I can start a new thread for this if necessary

Marianne
Level 6
Partner    VIP    Accredited Certified

Check rman script. Recovery catalog is used if a line like is present:

connect rcvcat .......... 

Please start a new thread if this is the case - it should be an interesting discussion. I will have to 'dig' as well - I remember reading something long time ago....