[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::digital_unix

Title:DIGITAL UNIX(FORMERLY KNOWN AS DEC OSF/1)
Notice:Welcome to the Digital UNIX Conference
Moderator:SMURF::DENHAM
Created:Thu Mar 16 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:10068
Total number of notes:35879

8931.0. "HP->DU-tar,cpio" by HGOVC::NANDAN () Sat Feb 22 1997 04:52

    
    We want to transport data from a HP system to a DIGITAL UNIX 
    system on a DAT tape (120mtrs) reading it using a TLZ07. The 
    volume of data is such that it can NOT fit on to one tape.
    
    The data is basically Oracle 'exp' data. The first time around we 
    tried to use the data that was directly exported on to 2 tapes. In 
    trying to import it it would read data up to (what we guess) to 
    the end of the tape & then the process would go into a sleep.
    
    Oracle has explicitly told us to avoid using export directly on to 
    a tape, saying it would not work. They have suggested the use of 
    the 'exp' being piped to 'tar' or 'cpio' and then on to tape.
    
    Keeping in mind that the data is coming from a HP system, I have 
    the following queries -
    1. Between 'tar' & 'cpio' which is more "robust", or "flexible" 
       across different vendors ?
    2. Are there any specific flags that need to be taken care of on 
       the HP, or on DIGITAL UNIX to ensure compatibility ?
    3. As mentioned earlier, the data would definitely span two or 
       more tapes. Between 'tar' and 'cpio', which can handle 
       multi-volume tapes better ?
    4. Or, is it advisable to avoid multi-volumes, especially with DAT 
       media, and considering that it is HP to DIGITAL  ?
    
    Can someone please advise me on this.
    
    Thanks in advance.
    
    Nandan
T.RTitleUserPersonal
Name
DateLines
8931.1In addition...HGOVC::NANDANMon Feb 24 1997 06:5520
    
    An additional problem I have discovered on actually trying to
    pipe the output of 'exp', is that it does not work.
    
    I tried to pipe the output of 'exp' to 'tar', but possibly because 
    of a wrong parameter given by me, it creates a local file.
    
    For example, I tried -
    $exp userid=scott/tiger file=- | tar cf /dev/rmt0h -
    
    It creates a file called "-.dmp". I tried quoting that parameter, 
    for e.g-
    'file=-' or file=(-) or file=\-.
    
    From the Server Utility User's Guide, I am not able to find an 
    option to pipe out the output of 'exp'.

    Thanks in advance.

    Nandan
8931.2COL01::LINNARTZMon Feb 24 1997 13:138
    If I rmember right, tape compability between HP and us is covered
    in stkhlm::magtape.
    
    i think your tar problem in .-1 is due to the -f usage.
    if you still have problems, try to use
    dd if=/dev/rmt0[lmh] conv=swap | tar xvf -
    
    Pit
8931.3Thanks!HGOVC::NANDANMon Feb 24 1997 19:5410
    
    Pit,
    
    Thanks for the pointer. I will look at that notes conf.
    
    However, please note that part of the problem is in Oracle's 'exp'
    command. Besides, I am able to retrieve part of the data, so I guess
    the data may not need the 'swap' flag.
    
    Nandan
8931.4Caution - multi-volume is not standardizedRUSURE::KATZMon Mar 10 1997 17:1131
The official XPG4 tar archive format doesn't mention
how to form a multi-volume header. In my past experience
I've found that it may be necessary to backwards 
engineer to figure out how the other guy does it.
We have a header that comes up short (is followed by
less blocks than it claimed). Then (I believe) on the
new volume no new header is used, rather we continue
writing the blocks that we started to write when we got
ENOSPC.
Under Ultrix we added a header to precede this
continuation. The advantage was that the second volume
could be seen as a tar tape if you mounted it. However
it could also confuse you, into thinking that the 
continuation section of the file was the whole file.
No telling how the other OS's do it...
It might be worth feeding the first blocks of an HP
continuation tape to tar
	dd if=hp_tape count=2 | tar -t -v -f -

if it's not a header, tar will complain right away

If HP stores it differently, you should still be able
to work it out, using dd as a feeder to tar. If you need
to, dd can also skip records. So for example, DUNIX could
read an ultrix tarset by adding "skip" count to the dd
command when you start on the second volume. You might
want to dd to disk, the files before and after the volume
change, so you can study the problem more carefully.

good luck,
Charlie Katz
8931.5Thanks!HGOVC::NANDANTue Apr 01 1997 21:126
    
    Charlie,
    
    Thanks for the info.
    
    Nandan