[HPADM] Re: Tar Question...

From: bill.thompson@goodyear.com
Date: Mon Sep 09 2002 - 13:20:13 EDT


Jim,

Give this a try

First, skip to the eob record you just created (be sure to use the
no-rewind tape device)
>mt -f /dev/rmt/0mn fsf 1

Now, try to list the tape using tar again using the no-rewind tape device.
>tar -tvef /dev/rmt/0mn

Try the above command two or three times (there's probably and extra eob
record you'll need to get by).

If you get a listing, rewind the tape and repeat the commands using the x
(extract) option of tar.

If that doesn't work you could try the mt -f /dev/rmt/0mn fsf 1 again, then
dd to dump the broken tar file to a file on disk, manually repair it, then
untar the repaired file. You'll need an editor such as vim that can work
with binary files (if the tar file contained binary files). It helps to
know a little about the tar file headers, but that's not very difficult.

Note - no matter what you do, you are going to lose whatever the tar -cvf
overwrote. There is no way to recover that data.

Good luck!

Bill Thompson
The Goodyear Tire & Rubber Company
Contains Confidential and/or Proprietary Information.
May Not Be Copied or Disseminated Without Express Consent of The Goodyear
Tire & Rubber Company.
                                                                        
                                                                        
                                                                        
                                                                        

                                                                                                                        
                    Jim Langston
                    <jim.langston@walker To: "HP-UX List (E-mail)" <hpux-admin@dutchworks.nl>
                    first.com> cc:
                    Sent by: Subject: [HPADM] Tar Question...
                    hpux-admin-owner@Dut
                    chWorks.nl
                                                                                                                        
                                                                                                                        
                    09/09/2002 12:31 PM
                                                                                                                        
                                                                                                                        

Fellow Admins,

Well I am now in line for the infamous DOH! award. I have a DDS3 tape that
had some data from a box that we retired a while back. Mostly it was
scripts, depot's etc. I did a tar -tvf /dev/rmt/0m to ensure the tape was
good, and it was. However, I wanted to extract it into /opt/omni/jimla.
So
before I had my morning coffee, I did: tar -cvf /dev/rmt/0m
/opt/omni/jimla
and you guessed it, my data disappeared, and when I do a tar -tvf
/dev/rmt/0m I see /opt/omni/jimla. DOH!

Now the question is this..... Can I recover the data that was on there, or
has the table of contents been overwritten?

Cheers,

Jim Langston
Unix Administrator
Walker & Associates
jim.langston@walkerfirst.com
Office: (336) 731-5465
Fax: (336) 731-1588
Cell: (336) 250-6073

--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact
majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner:
owner-hpux-admin@dutchworks.nl
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse
only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse &
search)
--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:19 EDT