exclude include path problems

2022-02-06 Thread Edwardo Garcia via rsync
Halo,

for few hours now I have been racking my brain and going even more grey if
that is possible.

for some time my rsync script works, but now I see it does not, after
changes  mirror operator made, as a result I need some help.

Lets call module mirror
this results in about 200 or more directories (projects), but I only want
one of them, lets call it foo, the problem is foo/  has about 50
directories, but the one and only one we want is bar, but bar also has
dozens of directories - but we do want these ones.

so  we want server:mirrors/foo/bar/*

How do we place our rsync command?

we have tried all kinds of   --include=foo/bar/  --exclude=*
servername:mirrors/
we tried an include exclude include exclude  too, infact every conceivable
method I've tried for hours, just about to give up with conclusion it can
not be done.with rsync but before I delete now outdated repository I
thought I would try one last ask here?

ed
-- 
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


directory atime not preserved by --open-noatime

2022-02-06 Thread xolodho via rsync
Hi.

(using version v3.2.3 on Linux, this might be Linux specific)

I recently noticed that rsync's --open-noatime option does not preserve
directory access times (atime) of the source directories (so they get all
modified), even though it does preserve atime of files within those directories,
the result is rather inconsistent. rsync's manpage says that --open-noatime
preserves files' atime and says nothing about directories so I don't consider
this a bug strictly speaking, however it would be nice if --open-noatime
preserved directories' atime too, at least (in Linux) it seems to be
implementable in theory.

I assume the current behavior is caused by opening directories via opendir(),
which unlike Linux open() does not permit supplying the O_NOATIME flag (nor any
flag at all). however, open() not only can be used for normal files, but also
for directories, even with O_NOATIME. in practice, instead of using opendir(),
one can use the open() + fdopendir() combo, afterwards readdir() can be used on
the DIR pointer as usual. this flag has some extra ownership restrictions (e.g.
from the open (2) linux manpage: "The effective UID of the process matches the
owner UID of the file"), this could trigger an EPERM error which wouldn't happen
if the flag weren't used (while opening a not-owned dir). I don't know how
reasonable it might be to have this implemented in rsync...

xol

-- 
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