Amanda-Users

Re: question

2003-01-30 17:08:25
Subject: Re: question
From: barryc <barryc AT rjlsystems DOT com>
To: amanda-users AT amanda DOT org
Date: Thu, 30 Jan 2003 16:11:49 -0500 (EST)
man tar
<SNIP>
  Function Modifiers
     The characters below may be used  in  conjunction  with  the
     letter that selects the desired function.

     p     Restore the named files to their original  modes,  and
           ACLs  if  applicable,  ignoring  the present umask(1).
           This is the default behavior if invoked as  super-user
           with  the  x function letter specified. If super-user,
           SETUID and sticky information are also extracted,  and
           files are restored with their original owners and per-
           missions, rather than owned by root. When  this  func-
           tion  modifier  is  used with the c function, ACLs are
           created in the tarfile along with  other  information.
           Errors   will  occur  when  a  tarfile  with  ACLs  is
           extracted by previous versions of tar.
<SNIP>
also note
<SNIP>
     o     Ownership. Assign to  extracted  files  the  user  and
           group  identifiers  of  the  user running the program,
           rather than those on  tarfile.  This  is  the  default
           behavior  for users other than root. If the o function
           modifier  is  not  set  and  the  user  is  root,  the
           extracted  files will take on the group and user iden-
           tifiers of the files on tarfile (see chown(1) for more
           information).  The  o  function modifier is only valid
           with the x function.
<SNIP>

You will likely also need to run amrestore as root.

>I  login as 'amanda' to run 'amdump' and 'amrestore'.
>The utility is GNUTAR.
>The command 'amrestore -p ...| tar xvf -'  works, but the owner of  restored
>files were changed 
>to 'amanda'.
>How to prevent to change 'owner'?


<Prev in Thread] Current Thread [Next in Thread>