Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On a HP-UX OS I have a backup on a magnetic tape created from the SAM. Everywhere I read the instructions to list-verify the contents of the tape is to use the TAR program:

#tar tvf /dev/rmt/[tapefile]

I've created a new directory /tape with 777 permissions, but when I execute the above command it gives me an error message:

#pwd
/tape
#tar tvf /dev/rmt/0mn >> listtape
Tar: blocksize = 2
directory checksum error

Going after the blocksize error I used another version of the command with the "b" flag:

#tar tvb 2 /dev/rmt/0mn >> listtape
directory checksum error

Anybody have a sugestion? How can I view the contents of the tape? What does this error means?

share|improve this question
    
Are you sure you have a tar style backup on the tape? Do you know what command was used to make the archive? –  Zoredache Dec 13 '11 at 16:27
add comment

4 Answers

up vote 3 down vote accepted

I did solved this problem and I will post the answer here just in case anyone else have a similar problem.

Since the backup was created using SAM, TAR was NOT used to create the tape. More than likely 'fbackup' was actually used.

In order to see what is on the tape i should use the 'frecover' program.

This command will read the table of contents from the tape (/dev/rmt/0m) and write it out to /tape/tape.idx.

# frecover -I /tape/tape.idx -f /dev/rmt/0m
share|improve this answer
add comment

To see what format a backup is in you can use something like this:

dd if=/dev/rmt/0m of=/tmp/tapehead bs=1024 count=2
file /tmp/tapehead

I.e copy the first 2k from the tape to /tmp/tapehead and then run file on it to see what format it is.

This assumes that your /etc/magic file contains the given format description but even if not so, you might be able to identify the format using more, vi or od combined with Google. Some backup programs (Amanda for example) even includes a text file as the first file on the tape describing how to extract the tape.

share|improve this answer
add comment

tar tv should be sufficient to list the files to stdout (unless there's more than one tape device).

share|improve this answer
    
Just "tar tv"? :o –  Spirit Dec 13 '11 at 13:24
    
There it is again the same error... #tar tv Tar: blocksize = 2 directory checksum error –  Spirit Dec 13 '11 at 13:26
1  
Something ain't right... time to call HP I think. –  Chris S Dec 13 '11 at 13:48
add comment

Hi i don't know if your solved your problem. But if i remember i faced already this problem.

Try to rewind the tape

mt -f /dev/rmt/0mn rewind

and launch after this command

/usr/local/bin/tar tv /dev/rmt/0mn

The problem is the difference version of tar tool that is used to create the archive with your tar tool.

try this :

which tar

hope this helped you.

share|improve this answer
    
Just tried that. There is only one tar on the system that is /usr/bin/tar. I also rewind the tape as you suggested it still gives the same error. :S I even tryed to forward it on the first file using # mt -t /dev/rmt/0mn fsf 1. –  Spirit Dec 13 '11 at 14:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.