tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY:  moving file system
@ 1997-02-15 23:35 don
  0 siblings, 0 replies; only message in thread
From: don @ 1997-02-15 23:35 UTC (permalink / raw)
  To: tru64-unix-managers


>That is the expected behavior, use the p flag when extracting things
>to get the correct owner of the directories

Thanks to all of you for the helpful suggestions but believe me, the
very first thing I tried before I even asked the list was the p flag.
As best I can tell on DU 3.2C, the p flag on tar has absolutely no
affect.  All directories are owned by root regardless of the p flag or
not.

I tested some of the other suggestions I got.  It appears that the
ownership problem is not unique to tar.  cpio gives a similar problem
when invoked as below.

% find . -print|cpio -pcvdumB /usr/newdisk


I think the best solution that several people suggested is to use a
variant of a dump command like:

% vdump -0f - -D | vrestore -xf - -D /newplace

or 

% dump 0sdf 6000 54000 - /usr | (cd /newplace ; restore xf -)

I have not verified that all of these options work.  

ORIGINAL QUESTION
>
> I've got a strange problem.  I'm trying to move all the user files
> >from /usr/users to a new larger hard drive.  I have mounted the new
> file system and would like to copy all files from the old partition to
> the new.   I'm using commands like:
> 
> cd /usr/users
> tar cf users.tar .
> cd /usr/newdisk
> tar xf /usr/users/users.tar
> 
> The problem is when the files are extracted all the subdirectories are
> owned by root.  Not only the directories in the /usr/newdisk but every
> directory on down lower.  Shouldn't tar maintain the ownership of all
> the files?  The files come back with the original ownership and
> permissions but the directories are all owned by root.  Ideas?


-- 
  Don H. Olive, Physics Department    don@campbellsvil.edu
  Campbellsville University           http://www2.campbellsvil.edu/~don
  CPO 1265, One University Drive      +1.502.789.5243 voice/+1.502.789.5170 fax
  Campbellsville KY, 42718 USA        PGP:  finger don@cygnus.campbellsvil.edu

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-02-15 23:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-02-15 23:35 SUMMARY: moving file system don

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