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

Re: copy directory tree, mapping to new owners



On Du, 12 sep 21, 08:52:55, john doe wrote:
> On 9/12/2021 3:45 AM, Richard Hector wrote:
> > On 12/09/21 12:52 pm, Greg Wooledge wrote:
> > > 
> > > cd /src
> > > mkdir -p /dest
> > > rsync -a . /dest/      # The trailing / matters.
> > > cd /dest
> > > find . -user mysite -exec chown mysite_test {} +
> > > find . -user mysite-run -exec chown mysite-run_test {} +
> 
> Given that you want to change the ownership, you may want to emulate the
> options implied by '-a' but without the ownership option ('-o').

It might not matter for a site[1], but do note that -a doesn't include 
-H (preserve hardlinks), -A (preserve ACLs) and -X (preserve extended 
attributes).

[1] It definitely matters for system installations, as I found out the 
hard way.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser

Attachment: signature.asc
Description: PGP signature


Reply to: