[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: restoring FC1 to *new* partition from tar archive



It would appear that on May 9, Luciano Miguel Ferreira Rocha did say:

> On Sun, May 09, 2004 at 08:21:43AM -0500, Jeff Vian wrote:
> > I think you are confusing /restore/ with /use/.  
> > It can be /restored/ using any system. The ownership is numeric and does 
> > not change on a differnent system.
> 
> No, I'm not confusing it, and no, the ownership isn't numeric. At least,
> in my experience. I've created backups of redhat and fedora installs, in
> single user mode, and restore them under live cds (knoppix or self-made).
> If I didn't use the option I described, some files would end with
> different numeric ids than they should. In particular, the knoppix cd has
> different values for cups and other system accounts, and when restoring
> the files would use those values.
> 
> When booting the restored system, those files would have invalid
> owners/group.
> 
> > The user ids are a problem if /used/ on a system where the group and 
> > passwd files define different userids for the owners.
> 
> Not as such. As tar uncompresses using user and group names (in _my_
> experience), the extracted files will be usable by the users on that
> system.
> 
> Of course, if you consider the "use" of such backup as above, then it
> still is a problem.
> 
> Regards,
> Luciano Rocha

Now I'm getting a little confused... I found two relevant items under
info tar.

=> `--numeric-owner'
=>      This option will notify `tar' that it should use numeric user and
=>      group IDs when creating a `tar' file, rather than names.

Which option isn't even mentioned in man tar. Now here is the part I
don't understand. If it's supposed to be more reliable when extracting
to a different system, How would it deal with file belonging to
user=goodDube has UID=1001 on the source file system when on the
destination file system UID=1001 is held by user=EvilTwin???

-> `--same-owner'
->      When extracting an archive, `tar' will attempt to preserve the
->      owner specified in the `tar' archive with this option present.
->      This is the default behavior for the superuser; this option has an
->      effect only for ordinary users.

Which option is listed (sparsely) in man tar, and sounds like it will
try to keep the same owner, based on the user name of owner. 

What happens  when the filesystem that is creating/extracting the
tar file has different UID numbers for some users than the
source/destination file system. Does it actually think to look up the
users in the destination system's passwd file (that would be a neat
trick) or does it fall back on it's own passwd file?


I'm guessing that when --numeric-owner is used then in the first
scenario EvilTwin would become the new file owner. And that in the
second scenario the UID from the source file would be used even when
tar thinks it may belong to an unknown user on the destination system.

I'm also guessing that when --numeric-owner is NOT used, then in the
first scenario tar would look up the username "goodDube" in the passwd
file and use that users UID. But that in the second scenario, it would
wind up assigning the user id from it's own filesystems passwd file
which may not match the user id of the destination filesystem's passwd
file...

Sheesh, this is confusing. It's sounding more and more like the fact
that mdk didn't appear to mess up my FC1 is probably a fluke.

If I wanted to use the --numeric-owner option, do I need to use it
during both the "tar -c" AND the "tar -x" process, or only during the
extraction?

-- 
|      ?           ?		
|			
|        -=-   -=-	 I'm NOT clueless...    	
|        <?>   <?>    	But I just don't know.  	
|            ^          Joe (theWordy) Philbrook           
|           ---  	     J(tWdy)P
|			  <jtwdyp ttlc net> 
|      ?           ?		



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]