Operating System - HP-UX
1834758 Members
3570 Online
110070 Solutions
New Discussion

Re: Problem in extracting tape contents on HP-UX server

 
Jason Lin
New Member

Problem in extracting tape contents on HP-UX server

I'd created a tape archive that consumed 3 tapes months back, however when I tried to retrieve the contents using the tar command, it just stops after first tape (with command prompt returned with no error message).

I would like to know if there's anyway I can retrieve the contents of 2nd and 3rd tape without putting in the first tape?
7 REPLIES 7
Peter Godron
Honored Contributor

Re: Problem in extracting tape contents on HP-UX server

Jason,
1. are you sure the backup worked over multiple tapes
2. What software did you use to create archive (tar,fbackup,pax)
3. What happens if you insert the second/third tape and do a tar -tvf

HGN
Honored Contributor

Re: Problem in extracting tape contents on HP-UX server

Hi

I think the backup's might not be from tar , maybe it is cpio. Maybe it is cpio or some other software.

Rgds

HGN
Bill Hassell
Honored Contributor

Re: Problem in extracting tape contents on HP-UX server

Is this an old version of HP-UX? Early versions of tar did not handle multi-tape backups well at all. tar is extremely primitive and the 2nd and 3rd tapes may fail because they do not start with a standard tar header. You might try pax since it understands variable block sizes as well as knowing about tar and cpio formats. Note that tar, cpio and other legacy backup tools have no index so you have to read every file on the backup to get to the last file. The same is true for getting a table of contents.

The only multi-tape backup tool that allows you to randomly access any tape in the set is fbackup. It records a progressive index at the front of each tape, thus allowing you to put in the last tape, run frecover and if the file is not on the last tape, it will prompt you for the correct tape automatically (within seconds).


Bill Hassell, sysadmin
Jason Lin
New Member

Re: Problem in extracting tape contents on HP-UX server


Hi,

first of all thanks for replying to my question:

1)Peter Gordon

- not too sure as it was not caried out by me
- tar
- I've not tried the 'tar -tvf' on 2nd or 3rd tape. When I tried the same command on 1st tape, it did not return all the file names that my customer claimed they have backup; jsut partial of it. When they tried the 'tar -cvf' command on 2nd or 3rd tape, it returned a checksum error!

2) HGN

- As I can verify from the 1st tape, the backup was carried out using 'tar'

3) Bill Hassell

the server is running on version 11.11. Do you mean in my situation, I can try using 'pax' command to retrieve the contents in 2nd and 3rd tape?

Thanks for the great info you are sharing with me. I'll sure use fbackup to carry backup in future.
Bill Hassell
Honored Contributor

Re: Problem in extracting tape contents on HP-UX server

"When they tried the 'tar -cvf' command on 2nd or 3rd tape, it returned a checksum error"

Uhhhhh, if they used this command (tar -cvf ...) on the 2nd and 3rd tapes (and the tapes were NOT write-protected), they just destroyed the tape contents. If the command was actually tar -tvf as you tried for the first tape, then possibly pax will sync up -- assuming the tapes actually are the 2nd and 3rd tapes of a multi-tape backup *and* were not accidently overwritten before they were removed from the tape drive. You can try pax to get a table of contents from tapes 2 and 3:

pax -v -f /dev/rmt/whatever


Bill Hassell, sysadmin
Jason Lin
New Member

Re: Problem in extracting tape contents on HP-UX server


Oops...typo mistake..it should be 'tar -xvf'

If the pax -v command does return the table of contents, which option I can use to retrieve the data from 2nd and 3rd tape?
Bill Hassell
Honored Contributor

Re: Problem in extracting tape contents on HP-UX server

This should help:

http://docs.hp.com/en/B2355-60127/pax.1.html

Try something like:

pax -r -f /dev/rmt/whatever -v -k

and specify the directory or filenames desired. Just like tar and cpio, you'll need to handle alternative directory locations. Otherwise, the files go back to the directory as saved on the tape.


Bill Hassell, sysadmin