From owner-freebsd-questions Thu Dec 11 09:27:29 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id JAA28075 for questions-outgoing; Thu, 11 Dec 1997 09:27:29 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from caladan.tdx.co.uk (caladan.tdx.co.uk [195.188.177.4]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id JAA28069 for ; Thu, 11 Dec 1997 09:27:22 -0800 (PST) (envelope-from kpielorz@tdx.co.uk) Received: from tdx.co.uk (lorca-tx.tdx.co.uk [195.188.177.242]) by caladan.tdx.co.uk (8.8.5/8.8.5) with ESMTP id RAA01722; Thu, 11 Dec 1997 17:07:13 GMT Message-ID: <3490238F.20A3A7D9@tdx.co.uk> Date: Thu, 11 Dec 1997 17:31:59 +0000 From: Karl Pielorz Organization: TDX X-Mailer: Mozilla 4.04 [en] (WinNT; I) MIME-Version: 1.0 To: Chris Vance CC: freebsd-questions@freebsd.org Subject: Re: Need help recovering from tape (partially overwritten) References: <199712111647.LAA12971@clipper.hq.tis.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Ugh... I've been there before... One of our customers had an HP 9000 and did very similar (the tape didn't eject and their backup started 'running over' the top of the previous nights backup, then failed...) I spent a day trying to get the data back... Attempts ranged from doing weird & wonderful things with cpio, tar etc. - and ended with me getting a crash course in IOCTL's, device drivers, mt and the way data's written on tape... Unfortunately, at the end of the day (and after searching the internet etc.) - it looked like it couldn't be done easily. The main problem is the moment you hit CTRL-C, the tape would have had a double end marker written to it, and most DAT drives (the numerous ones we tried included Wang, HP, Viper etc.) - will refuse to go beyond the mark, it's practically in the drives firmware. Having said that - we came up with a proposed suggestion - which was rejected at the time, that is to get the DAT to go as far as it can - pull the power on it, then wind the tape on by hand past the fatal end markers - and try from there on (don't ask how we'd stop the tape from being rewound when the system came up ;-)... This was rejected in favour of sending the tapes to a data recovery service - who did manage to get the data back, I suspect either by using similar means () - or by using bespoke software / drivers etc. In my endeavours I'd got as far as the SCSI subsystem, and sending scsi commands directly to the tape, which on an HP 9000 with 2 'fridges' worth of drives (fortunately it was a 'dev' box with not many users logged in, as opposed to a production server) is as scary as I wanted it to get, it was also around then we'd run out of time... (but I seem to remember even at that level the stupid DAT didn't want to go further than the double end markers)... :-( Good luck, and if the data is very valuable try contacting a data recovery service... (ps. Make sure the tapes write protected now!) Regards, Karl Pielorz Chris Vance wrote: > > Unfortunately, last night I didn't jump to the end of the media before > writing a new tar (actually I use scripts to do all this, and one > screwed up) so it began to write a new tar file directly to the > beginning of the tape. I hit ^C, but the damage was done; it wrote > part of the tar file, and an end of media mark. > > Now I can't jump past the screwed up archive and access subsequent > ones on tape; mt won't seek past the end of the first archive. I know > the rest of the archives on the tape are still there, if I can just > seek past that first archive (and the eom mark). I only overwrote the > first 300k of the first archive. If I lose the first one on the tape, > that's fine, I just want to restore the other 1+GB of archives. > > How can I retrieve the rest of the archives off the tape? > > thanks for the help, > chris.