Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* tar -C command on DEC Unix 4.0
@ 1998-06-26  4:00 chl_william
  1998-06-26  4:00 ` Nikola Milutinovic
  0 siblings, 1 reply; 4+ messages in thread
From: chl_william @ 1998-06-26  4:00 UTC (permalink / raw)



Hi,

I wonder if someone can help me to restore my archive file created by
the following tar command on DEC Unix 4.0b

    tar cpvf /dev/rmt1h -C /u01/data . - /u02/data .

When I use tar command to restore the files, ALL the files were restored
under my current directory which resulted in a disk full situation i.e.
ALL the directory structure information were gone.

Is there a way to store the files back to the original directory in 2
different disks? What tar command and option should I use? I have tried
the -C option again, but it is not working for restoring tape :(

Thanks for any information.
William



-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: tar -C command on DEC Unix 4.0
  1998-06-26  4:00 tar -C command on DEC Unix 4.0 chl_william
@ 1998-06-26  4:00 ` Nikola Milutinovic
  1998-06-29  4:00   ` chl_william
  0 siblings, 1 reply; 4+ messages in thread
From: Nikola Milutinovic @ 1998-06-26  4:00 UTC (permalink / raw)



chl_william@hotmail.com wrote:
> 
> Hi,
> 
> I wonder if someone can help me to restore my archive file created by
> the following tar command on DEC Unix 4.0b
> 
>     tar cpvf /dev/rmt1h -C /u01/data . - /u02/data .
> 
> When I use tar command to restore the files, ALL the files were restored
> under my current directory which resulted in a disk full situation i.e.
> ALL the directory structure information were gone.

With this you actually have no absolute path info. And unless tar stores
the information that it changed its CWD (-C option), in the archive, on
that very spot, you're stuck.

Try listing the archive with "tar t", see if there is a mark (I doubt
it). Try manually creating file list of the first "save set" and
extracting just those files.

What can I say, nice mess. Like you did "cp -r /u02/data/* /u01/data ;
tar /u01/data"

Good luck.

Nix.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: tar -C command on DEC Unix 4.0
  1998-06-29  4:00   ` chl_william
@ 1998-06-29  4:00     ` Rich Lafferty
  0 siblings, 0 replies; 4+ messages in thread
From: Rich Lafferty @ 1998-06-29  4:00 UTC (permalink / raw)



chl_william@hotmail.com <chl_william@hotmail.com> wrote:
>In article <3593B961.41D6E142@EUnet.yu>,
>  Nikola Milutinovic <milutinn@EUnet.yu> wrote:
>>
>> chl_william@hotmail.com wrote:
>> >
>> > Hi,
>> >
>> > I wonder if someone can help me to restore my archive file created by
>> > the following tar command on DEC Unix 4.0b
>> >
>> >     tar cpvf /dev/rmt1h -C /u01/data . - /u02/data .
>> >
>> > When I use tar command to restore the files, ALL the files were restored
>> > under my current directory which resulted in a disk full situation i.e.
>> > ALL the directory structure information were gone.
>>
>> With this you actually have no absolute path info. And unless tar stores
>> the information that it changed its CWD (-C option), in the archive, on
>> that very spot, you're stuck.
>>
>> Try listing the archive with "tar t", see if there is a mark (I doubt
>> it). Try manually creating file list of the first "save set" and
>> extracting just those files.
>>
>> What can I say, nice mess. Like you did "cp -r /u02/data/* /u01/data ;
>> tar /u01/data"
>>
>> Good luck.
>>
>> Nix.
>>
>>
>
>when I did the "tar t", there is NO directory information at all. Gee, I
>guess I have to do a "cd" to each directory and "tar" each file in that
>directory one by one.

Of course not. As the manual page explicitly states, the -C /dir performs
a chdir() to that directory. Its purpose to avoid including long absolute 
pathnames, not to include the pathnames (which is the usual behaviour
of tar without the -C flag).

>I am totally disappointed with this -C option and I can't see any benifit on
>using this stupid option at all.

Since you used it for the precise opposite of its purpose, I could
understand that. The benEfit of using that "stupid option" is to prevent
ugly hacks to get around having to include absolute paths when two
directories which need to be archived have no close common parent.


>Also, when I talked to DEC Support, the
>answer I got is something like you should have tested the command and options
>first before you use it and now you are on your own.

That sounds accurate. If you use a flag expecting it to do the opposite
of what it is documented to do, then support can't do a lot, can they?

It sounds like you used this flag to do a crucial backup. In that case,
yes, you *should* have tested the options first. Don't assume that
backups or archives work, that's gotta be rule #1 of a backup policy.

>May be that is the reason why Digital is gone.

Because you forgot to RTFM? Doubt it.

>-----== Posted via Deja News, The Leader in Internet Discussion ==-----

Ah, that explains it.

  -Rich

-- 
Rich Lafferty ---------------------------------------------------------
IITS/Computing Services     |      
Concordia University        |    Nothing sucks like a Vax! (tm)
rich@vax2.concordia.ca -----------------------------------------[McQ]--



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: tar -C command on DEC Unix 4.0
  1998-06-26  4:00 ` Nikola Milutinovic
@ 1998-06-29  4:00   ` chl_william
  1998-06-29  4:00     ` Rich Lafferty
  0 siblings, 1 reply; 4+ messages in thread
From: chl_william @ 1998-06-29  4:00 UTC (permalink / raw)



In article <3593B961.41D6E142@EUnet.yu>,
  Nikola Milutinovic <milutinn@EUnet.yu> wrote:
>
> chl_william@hotmail.com wrote:
> >
> > Hi,
> >
> > I wonder if someone can help me to restore my archive file created by
> > the following tar command on DEC Unix 4.0b
> >
> >     tar cpvf /dev/rmt1h -C /u01/data . - /u02/data .
> >
> > When I use tar command to restore the files, ALL the files were restored
> > under my current directory which resulted in a disk full situation i.e.
> > ALL the directory structure information were gone.
>
> With this you actually have no absolute path info. And unless tar stores
> the information that it changed its CWD (-C option), in the archive, on
> that very spot, you're stuck.
>
> Try listing the archive with "tar t", see if there is a mark (I doubt
> it). Try manually creating file list of the first "save set" and
> extracting just those files.
>
> What can I say, nice mess. Like you did "cp -r /u02/data/* /u01/data ;
> tar /u01/data"
>
> Good luck.
>
> Nix.
>
>

when I did the "tar t", there is NO directory information at all. Gee, I
guess I have to do a "cd" to each directory and "tar" each file in that
directory one by one.

I am totally disappointed with this -C option and I can't see any benifit on
using this stupid option at all. Also, when I talked to DEC Support, the
answer I got is something like you should have tested the command and options
first before you use it and now you are on your own. May be that is the
reason why Digital is gone.




-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp   Create Your Own Free Member Forum



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-06-29  4:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-06-26  4:00 tar -C command on DEC Unix 4.0 chl_william
1998-06-26  4:00 ` Nikola Milutinovic
1998-06-29  4:00   ` chl_william
1998-06-29  4:00     ` Rich Lafferty

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox