Re: Recover from an export on tape

From: Lee Parsons <lparsons_at_exlog.com>
Date: Mon, 4 Oct 93 19:24:45 GMT
Message-ID: <1993Oct4.192445.3506_at_exlog.com>


In article <1993Sep30.191034.87_at_cine88.cineca.it> px3bois1_at_cine88.cineca.it writes:
> A customer of ours has made an export of an entire database directly on
>a QIC tape.
>After rewinding the tape, he has made on it a cpio of a non-existant file,
>losing consequently the header of the precedent export file.
>We think that the very most part of the export is yet on the tape, but we have
>no idea of how to recovery all tht stuff.

Ouch. I can't tell you the right way of doing it, but I can tell you how I would attack the problem. :-}

I'm sure that some guru out there has a program that emulates export and would skip the header But I'm not that smart.

I think what you're going to have to do is rewrite the part of the export that was over written. On my system a cpio of a non existant file writes a block of 512 bytes. I'm now sure how the blocksize on the QIC works but it is a sure bet that you have overwritten some small multiable of 512 on your tape.

I would use dd or a c program to read the first few K off of the tape and use a binary editor to figure out how far into the export was over written. Then using the exp program create a blank export file with a valid header. Once you have the begining header and know how much of the tape to overwrite it should not be rocket science to write a blank but valid header back to the tape via again via dd or a small program.

The only two got ya's I see here are that you have to be careful about the block sizes. If you dont write back to the tape in the blocks that the system expects the driver will pad your write to the block size it wants. This will ofcourse result in a invalid export.

The second issue is that you will lose what ever was over written by the cpio. Since this is usually "grant connect"s you should be able to figure out what is going on and add the users manually.

One last thing, I would try this all on disk with the first few K before I wrote to tape. In fact if you can do it ALL on disk that would be best, Then all you have to do is edit that guy directly using something like xvi or uzap.

Anybody else see something here I have missed?

-- 
Regards, 

Lee E. Parsons                  		Baker Hughes Inteq, Inc
Oracle Database Administrator 			lparsons_at_exlog.com 
Received on Mon Oct 04 1993 - 20:24:45 CET

Original text of this message