Operating System - HP-UX
1830481 Members
2486 Online
110005 Solutions
New Discussion

gtar to restore filesystems at a particular point

 
Chern Jian Leaw
Regular Advisor

gtar to restore filesystems at a particular point

HI,
I would like to extract contents of a S-DLT tape. I had used:
# mt -f /dev/rmt6 rewind
#gtar -xvf /dev/rmt1 --same-owner --same-permissions

It produced the "Unexpected EOF on achive file" error at a certain point after reading the tape. Hence not all contents in the tape could be restored.

I would like to restore the remaining filesystems from the tape after the point of error.

I did the following:
#gtar -tvif /dev/rmt6
The command above lists all filesystems archived in the tape together with its date, ownerships, permissions, etc...
At the end of this output, it produced the output below at the same point where the error "Unexpected EOF on achive file" occured:
tar:There are 6220 blocks on /dev/rmt6
tar:Mount next media on device /dev/rmt6 and press return

Hence, I thought I could fsf to the point after 6220 and begin restoring it the remaining parts:
#mt -f /dev/rmt6 rewind
#mt -f /dev/rmt6 fsf 6230
/dev/rmt1 fsf 6230 failed: There is an input or output error.

I even tried:
#mt -f /dev/rmt6 rewind
#mt -f /dev/rmt6 fsf 6200
/dev/rmt1 fsf 6230 failed: There is an input or output error.

OR
#mt -f /dev/rmt6 rewind
#mt -f /dev/rmt6 fsf 6300
/dev/rmt1 fsf 6300 failed: There is an input or output error.

Could anyone offer some ideas on solving this matter?

I've attached the log file showing where the EOF error occured.

Thanks.
5 REPLIES 5
RAC_1
Honored Contributor

Re: gtar to restore filesystems at a particular point

say mt -f /dev/rmt/0m fsr 1

check tar -tvf /dev/rmt/0mn

goto the directory where you want to restore

pax -rv -s '/^\///' < /dev/rmt/0mn

Check if it restore.

Regards,
There is no substitute to HARDWORK
RAC_1
Honored Contributor

Re: gtar to restore filesystems at a particular point

Sorry a wrong reply.

Just goto directory where you would restore the files

say
pax -rv -s '/^\///' < /dev/rmt/0m and it restores in current directory.

Regards,
There is no substitute to HARDWORK
Chern Jian Leaw
Regular Advisor

Re: gtar to restore filesystems at a particular point

Anil,

I did what you suggested. However, at some point, I obtained some errors:

bk/fs36/nwdv.cr.8/v0_staging/indicator/dirty_bits/archive/May112002.1/Excel
pax: ./.@LongLink : 0511-646 The filetype is unknown

bk/fs36/nwdv.cr.8/v0_staging/indicator/dirty_bits/archive/Others/Doc
pax: ./.@LongLink : 0511-646 The filetype is unknown

Could you explain to me what the error means? I've not used pax before.

Thanks.
Chern Jian Leaw
Regular Advisor

Re: gtar to restore filesystems at a particular point

Anil,
For the error mentioned below:
bk/fs36/nwdv.cr.8/v0_staging/indicator/dirty_bits/archive/Others/Doc
pax: ./.@LongLink : 0511-646 The filetype is unknown

Would it affect the original type of the file?
Supposing if the file at arhived is of type .txt, I realize that the restoration process with the error mentioned above would eliminate the .txt extension.

Is there a way which I preserve the original properties?

Also, how can I as a root user preserve the ownerships of the archived filesystems upon restoration? I used pax with the options you provided but it caused the filesystems to have root as the owner, and not to that of the original owner.

Could you please help me out?

Thanks.

RAC_1
Honored Contributor

Re: gtar to restore filesystems at a particular point

I use pax to restore tar backups(taken with absolute path names)

The error you are getting, seems to be related with long link. Seems that pax is complaining about long link name.

I could make out only that.

Always take backups with fbackup/frecover is the systems are HP-UX, or else stick to the gnutar.

I always use tar as follows.

tar -cvf /dev/rmt/0m ./dir_to_backup

So I always use relative path.
There is no substitute to HARDWORK