Operating System - HP-UX
1753826 Members
8351 Online
108805 Solutions
New Discussion

How to list the files on a tape with TAR?

 
SOLVED
Go to solution
spirit986
Occasional Advisor

How to list the files on a tape with TAR?

On a HP-UX OS I have a backup on a magnetic tape created from the SAM. Everywhere I read on ither forums, 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 files the tape? What does this error means?

 

 

MCP
3 REPLIES 3
Patrick Wallek
Honored Contributor
Solution

Re: How to list the files on a tape with TAR?

If the tape was created using SAM, then I can almost guarantee that TAR was NOT used to create the tape.  More than likely 'fbackup' was actually used. 

 

If you want to see what is on the tape  you need to use the 'frecover' program.

 

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

 

frecover -I /tmp/tape.idx -f /dev/rmt/0m

 

 

spirit986
Occasional Advisor

Re: How to list the files on a tape with TAR?

Thank you Patrick, you just saved my day!
MCP
Patrick Wallek
Honored Contributor

Re: How to list the files on a tape with TAR?