Replacing damaged media

If media in your robot is damaged, you can use copies of the media (if available) from your off-site storage location to replace the damaged media. You also can use this process to recover images if the primary backup expired, the volume was overwritten, and a copy in off-site storage is still available.

Note:

This image recovery process assumes that the NetBackup system and image catalog are current and up to date.

The instructions use an example to illustrate how to run the various commands used in the recovery process. Modify the command examples as appropriate for your purposes.

Most of the commands used to recover from damaged media are in the following directory:

After you recover and restore the damaged media, you should revault the media so that it again is available for recovery.

To replace damaged media

  1. Identify the damaged media.

    When you receive an error message during a restore, the errors are logged to the restore log and also show up on the Activity Monitor as the restore fails. You can set up a procedure using NetBackup scripts to send errors to an event management console to notify the storage administrator immediately of this type of media error.

  2. Determine which backup images are on the damaged tape.

    To identify all images on a specific tape, run the bpimmedia command. It scans the entire NetBackup image catalog, so it may take a few minutes depending on the size of that catalog. For example, the following shows that volume S05423 contains one image from client fgolddust. It also shows that this image was duplicated because it has (FRAG 2) entries. The full image name is "fgolddust_0862806643":

    # bpimmedia -mediaid S05423
    IMAGE fgolddust 2 fgolddust_0862806643 golddust_BR1 0 
    Full_Weekly 0 3 19360 8654 85043 0 0
    FRAG 1 -1 2293 0 2 6 2 S05423 nirvana 64512 0 862804830 3 0 
    *NULL*
    FRAG 1 1 232848 0 2 6 1 S02643 nirvana 64512 2 862804830 3 0 
    *NULL*
    FRAG 1 2 1225539 0 2 6 2 S02643 nirvana 64512 0 862804830 3 0 
    *NULL*
    FRAG 1 3 70182 0 2 6 3 S02643 nirvana 64512 0 862804830 3 0 
    *NULL*
    FRAG 1 4 825700 0 2 6 1 S05423 nirvana 64512 2 862808446 3 0 
    *NULL*
    FRAG 2 -1 2293 0 2 6 2 S04440 nirvana 32768 0 862927577 2 0 
    *NULL*
    FRAG 2 1 2335584 0 2 6 1 S04440 nirvana 32768 2 862927577 2 0 
    *NULL*
    
  3. Determine which duplicate tapes were used and their host.

    In step 2, the (FRAG 2) entries show that an image was duplicated: the (FRAG 2 1) entry is the duplicate copy. On copy 1 there were four fragments (usually due to multiplexing). The (FRAG 2 -1) entry is the true image restore duplicate. In this case, the image fgolddust_0862806643 is using media S04440 for duplicating all of the original fragments. This is normal because the original image was multiplexed onto four tapes, while the duplicate was de-multiplexed during image duplication, and could fit on one tape.

    Also note that the host for the media is printed for each fragment, in this case nirvana. With media servers, the host could be different than the master server. Under Vault, the duplication should normally occur on the same server that made the original backup, so the host server names are the same for both copies of the image.

    To confirm this information, use the bpimagelist command, as follows:

    # bpimagelist -backupid fgolddust_0862806643
    IMAGE fgolddust 0 0 2 fgolddust_0862806643 golddust_BR1 0 *NULL* 
    root Full_Weekly 0 3 862806643 4591 865485043 0 0 2356562 19360 
    2 7 1 golddust_BR1_0862806643_FULL.f *NULL* *NULL* 0 1 0 2 
    865830643 *NULL* 1 0 0 0 0 *NULL*
    HISTO -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
    FRAG 1 -1 2293 0 2 6 2 S05423 nirvana 64512 0 862804830 3 0 
    *NULL*
    FRAG 1 1 232848 0 2 6 1 S02643 nirvana 64512 2 862804830 3 0 
    *NULL*
    FRAG 1 2 1225539 0 2 6 2 S02643 nirvana 64512 0 862804830 3 0 
    *NULL*
    FRAG 1 3 70182 0 2 6 3 S02643 nirvana 64512 0 862804830 3 0 
    *NULL*
    FRAG 1 4 825700 0 2 6 1 S05423 nirvana 64512 2 862808446 3 0 
    *NULL*
    FRAG 2 -1 2293 0 2 6 2 S04440 nirvana 32768 0 862927577 2 0 
    *NULL*
    FRAG 2 1 2335584 0 2 6 1 S04440 nirvana 32768 2 862927577 2 0 
    *NULL*
    

    To confirm which is the primary copy (the copy to use for restores), use the -L option with bpimagelist, as follows:

    UNIX: # bpimagelist -L -backupid fgolddust_0862806643 | grep 
    Primary
    Primary Copy: 1
    Windows: bpimagelist -L -backupid fgolddust_0862806643 | find 
    Primary
    Primary Copy: 1
    
  4. Tell NetBackup to use the duplicated copy rather than the original.

    Run the bpimage -npc command and option to change the primary copy. The new primary copy is used for restoring an image:

    # bpchangeprimary -copy 2 -id fgolddust_0862806643 -cl fgolddust
    

    To confirm the new primary copy, use the following command:

    UNIX: # bpimagelist -L -backupid fgolddust_0862806643 | grep 
    Primary
    Primary Copy: 2
    Windows: bpimagelist -L -backupid fgolddust_0862806643 | find 
    "Primary"
    Primary Copy: 2
    
  5. Freeze the duplicated copy to ensure restore.

    Use the command bpmedia -freeze to prevent NetBackup from expiring the images on the media and to ensure the media is assigned in Media Manager. You should also use the media host for this image that was printed by bpimmedia in step 2. This is required when the host is different than the machine on which you are running this command.

    bpmedia -freeze -m S04440 -host nirvana
    
  6. Recall media from the vault.

    Recall the appropriate volume from off-site storage.

    To determine the media ID, slot number, or container ID of the tape to recall, use the vmquery command, located in the following directory:

    • UNIX

      /usr/openv/volmgr/bin
      
    • Windows

      install_path\volmgr\bin.
      

    In the following example, the slot number (S278) is listed in the vault slot field:

    vmquery -m S04440
    ===============================================================
    media ID:				 S04440	 
    media type:			 8MM cartridge tape (4)	 
    barcode:				S04440	 
    media description:		Added by Media Manager	 
    volume pool:			Vaulted_CustomerDB (2)	 
    robot type:			 NONE - Not Robotic (0)	 
    volume group:			 DB_offsite_volumes	 
    vault name:			 Customer_DB_Vault	 
    vault sent date:		---	 
    vault return date:		---	 
    vault slot:			 S278	 
    vault session id:		 1	 
    created:				Tue Sep 3 10:08:32 2000	 
    assigned:				 Tue May 6 00:11:45 2001	 
    last mounted:			 Tue May 6 11:34:25 2001	 
    first mount:			Tue Sep 3 18:20:48 2000	 
    expiration date:		---	 
    number of mounts:		 21	 
    max mounts allowed:	 ---	 
    ===============================================================
    
  7. Inject recalled media back into the robot.

    When the tape is returned from the off-site vendor, inject it into the appropriate robotic library. First, insert the tape into the robot media access port. Then, from the NetBackup Administration Console, choose Media and Devices Management. Choose the Inventory Robot... option. Select the Empty Media Access Port Prior to Update checkbox.

    You can also perform this function using the vltinject command.

  8. Perform a normal restore operation.

    The restore should read from the new primary copy. The restore log should show a mount request for the duplicate media.

  9. Unfreeze media used for duplicates.

    After the restore is successful, unfreeze the duplicate media to allow the normal expiration process. If you want to send the tape off-site again, either remove it from the robot or leave it in the robot as the primary copy. Symantec recommends that you suspend the media so that no images are written to it.

    bpmedia -unfreeze -m S04440 -host nirvana
    
  10. Create new duplicate images.

    Optionally, you can create new duplicate images for transfer to your off-site vault vendor.

  11. Modify the NetBackup catalog for a large number of images.

    In a disaster recovery situation in which a large number of images need their primary copy modified, run the bpchangeprimary command. This command changes the primary copy of all the backup images in the off-site volume pool for which the media was returned from the off-site vault.

More Information

Revaulting unexpired media

Reduplicating a bad or missing duplicate tape