Thanks Francis,
Neither of those really do what I'd like: to properly sync/preserve
ownership/attributes for files below the root of the transfer (which are not
necessarily me:me -- I use groups for sharing between users), but to leave the
root attributes untouched, and to use filters anchored at the root.
Upon re-reading the man page, I see I misunderstood how /./ and
--no-implied-dirs works. I thought I could use them to solve this problem,
but it doesn't look like it.
>From my perspective it seems like a mis-match between where filters are
>anchored ("exclude the root") and where attributes are touched ("include the
>root").
This is a situation I encounter a fair bit. On Windows and Mac there are a
lot of user directories that are system-owned or have special system ACLs,
xattrs, etc: $HOME, Downloads, Desktop, Library, etc,
and I would like rsync to avoid touching those ownership/attributes, but also
to use filters that are anchored at the root of those (so that they can be
applied globally to any user).
E.g.
backup:
rsync -a ". HomeDir.rfilter"/Users//./
server:BACKUPDIR/Users//
restore:
rsync -a ". HomeDir.rfilter" server:BACKUPDIR/Users//./
/Users//
where HomeDir.rfilter is anchored at a user's home directory (and therefore
applies to any user) and attributes to the left of the /./ remain untouched
(which was my misunderstanding -- it doesn't work that way).
I hope this illustrates the issue I'm trying to solve.I had thought this
might be a somewhat common problem, but it doesn't seem like there is a good
solution to this. The easiest workaround for me so far is just to overwrite
the Mac/Windows system-owned attributes and make them owned by
:, but it's not ideal.
-- Chris
On Tue Aug 27 2019, at 11:31 PM, francis.montag...@inria.fr wrote:
>
> Hi.
>
> On Tue, 27 Aug 2019 14:56:25 -0700 Chris Roehrig via rsync wrote:
>
>> rsync -a --super --relative --no-implied-dirs "--filter=. HomeWin.rfilter"
>> /cygdrive/c/Users/me/./ myserver:/WinBACKUP/Users/me/
>
> If you are connecting to myserver as you (not root), simply
> suppressing the --super option should work.
>
> Otherwise (with a recent version of rsync) add: --chown me:me
>
> --
> francis
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html