cancel
Showing results for 
Search instead for 
Did you mean: 

invesigation data on cartridge and NB catalog

david_adir
Level 3
using NB 5.1 @ Solaris.
restore failed due to "media position error".
I need to investigate this error.

I need to compare structures of writes that really resides on cartridge, and NB catalog.
to know what really resides on cartridge I have:
tpreq , tcopy.
Any thing more ?

Now I need to look at the structure of the cartridge as NB catalog expect to have.
How can I do that ?
2 REPLIES 2

Yasuhisa_Ishika
Level 6
Partner Accredited Certified
Media position error occurs after retry?
Mostly it occurs by chance. First clean drive and retry.

If it occurs again, see /var/adm/messages and check error from st driver.
st driver report "Media Error" or so on when error occurs in drive. And check SCSI error.

No error reported in /var/adm/messages, the medium format may be wrong.
*** I recommend you to use bpverify. This is easy way. ***

But if you want to check paranoically, compare file lists by following step.


1. bpimagelist shows what backup-id is placed on medium. The information is picked up from catalog.

# bpimmedia -mediaid HZQ308 -U -d 01/01/1970

Backup-ID Policy Type RL Files C E T PC Expires
Copy Frag KB Type Density FNum Off Host DWO MPX Expires RL MediaID
------------------------------------------------------------------------------------------------

myhost_1118148074 fun FULL 1 23 N N R 1 21:41 06/21/2005
1 1 640 RMed hcart 2 15 myhost 0 N 21:41 06/21/2005 1 HZQ308

myhost_1118147893 fun FULL 1 23 N N R 1 21:38 06/21/2005
1 1 640 RMed hcart 1 2 myhost 0 N 21:38 06/21/2005 1 HZQ308



2. bpflist shows the file list those are backuped up with the specified backup-id.The information is picked up from catalog.

# bpflist -rl 999 -U -backupid myhost_1118148074

Client: myhost
Policy: fun
Backup ID: myhost_1118148074
Backed up: Tue Jun 07 2005 21:41:14 (1118148074)
Software Version: ?
Policy Type: Standard
Schedule Type: FULL
Version: 7
Keyword: ?
Num Files: 23
Files:
FN=1 L=0 PL=9 DL=49 BK=2 II=1 RS=0 GB=0 DN=35651584 P=/var/adm/ D=16893 root sys 0 1118147899 1118081400 1118081400
FN=2 L=0 PL=15 DL=49 BK=3 II=1 RS=0 GB=0 DN=35651584 P=/var/adm/aculog D=33152 uucp bin 0 1101437112 1101437112 1101437112
:
:
FN=22 L=0 PL=18 DL=48 BK=1265 II=1 RS=0 GB=0 DN=35651584 P=/var/adm/acct/sum/ D=16893 adm adm 0 1118147943 1101443750 1101443750
FN=23 L=0 PL=12 DL=48 BK=1266 II=1 RS=0 GB=0 DN=35651584 P=/var/adm/sa/ D=16893 adm sys 0 1118147943 1101443750 1101443750


3. Mount tape by tpreq

# tpreq -m HZQ308 -a r -d hcart -p test /tmp/tape


4. Check media id by vmoprcmd or cat

# vmoprcmd

PENDING REQUESTS



DRIVE STATUS

Drv Type Control User Label RecMID ExtMID Ready Wr.Enbl. ReqId
0 hcart TLD root Yes HZQ308 HZQ308 Yes Yes 0

ADDITIONAL DRIVE STATUS

Drv DriveName Shared Assigned Comment
0 Drive0 No myhost

# mt -f /tmp/tape rew
# cat /tmp/tape
VOL1HZQ308BサThIs Is A BP tApE hEaDer



5. get file list by tar

# mt -f device asf 2 # I want to get about myhost_1118148074(FNum=2)
# mt -f device asf 1 # skip first record(image header)
# /usr/openv/netbackup/bin/tar -tvf /tmp/tape
Blocksize = 126 records
drwxr-xr-x root/root 0 May 24 10:56 2005 /
drwxr-xr-x root/sys 0 Jun 3 13:40 2005 /var/
drwxrwxr-x root/sys 0 Jun 7 03:10 2005 /var/adm/
-rw------- uucp/bin 0 Nov 26 11:45 2004 /var/adm/aculog
:
:
drwxrwxr-x adm/adm 0 Nov 26 13:35 2004 /var/adm/acct/sum/
drwxrwxr-x adm/sys 0 Nov 26 13:35 2004 /var/adm/sa/

Derek_Black
Level 4
In addition to the previous poster's comments (on how to get the image list from that catalog) you can read the information directly from the header of the tape with the bpmedialist command. What you want to do is check the the media contents report by using the -mcontents option. So, the full command would be (under the /usr/openv/netbackup/bin/admincmd directory)

bpmedialist -mcontents -m media_id

This is probably the easiest way to ge the contents of the actual tape, as it is read directly off the header.