Problem
Performing DR catalog recovery produces the following error: "MediaID can not be located in Netbackup media manager database"
Error Message
MediaID can not be located in Netbackup media manager database
Cause
In this scenario, there are two possible causes for this error:
- A mediaID generation rule used in the DR site is different to the one used in the original environment
- A new tape library has replaced the old library which was only able to read 6 digits.
Troubleshooting:
Run the following command to list details for the problematic mediaID:
#/usr/openv/netbackup/bin/admincmd/bin/nbemmcmd -listmedia -mediaid <mediaid>
Example output of nbemmcmd:
====================================================================
Media GUID: 35425d10-18d1-13f9-8009-d5b43f70fcd0
Media ID: R329LT Partner: - Media Type: HCART3
Volume Group: 000_00000_TLD
Application: Netbackup Media Flags: 1
Description: Added by Media Manager
Barcode: NOR329LT
Partner Barcode: --------
Media Server: NONE
Created: 02/27/2008 02:37
......
====================================================================
Sample output from the DR file:
# FRAG: c# f# K rem mt den fn id/path host bs off md dwo f_flags f_unused1 exp mpx rl chkpt rsm_nbr seq_no media_subtype i_unused3 i_unused2 i_unused1
FRAGMENT 1 -1 931 0 2 20 99 NOR329 netbackup 65536 5400014 1200640517 1 0 *NULL* 0 0 0 0 0 0 1 0 0 0
FRAGMENT 1 1 3735136 0 2 20 98 NOR329 netbackup 65536 5341650 1200640517 1 0 *NULL* 1204608132 0 65537 0 0 0 1 0 0 0
In the above example:
Media ID: R329LT
Barcode: NOR329LT
DR record shows that the mediaID is NOR329:
FRAGMENT 1 -1 931 0 2 20 99 NOR329
Tape has an 8 digit barcode = NOR329LT. Previously, the mediaID was generated using the first 6 digits (NOR329). Currently, the mediaID is generated by using the last 6 digits (R329LT).
Solution
- Remove the current mediaID (R329LT) from your newly environment as well as any other media with same situation
Administration Console | Media | select mediaID | right click to Delete
- Create mediaID generation rule:
Administration Console | Media | Robot Inventory | Advanced Option | MediaID generation rule | Add New Rule => Robot number (as configured)
Rule => Barcode length = 8
Rule => MediaID generation rule = 1:2:3:4:5:6 (use first 6 digits)
- Save rule and now run Robot Inventory. You should notice the difference in mediaID being generated, make sure it matches "NOR329"
- Proceed with catalog recovery as usual.