[Bug 14371] Combined Exclude & Protect Filter Type
samba-bugs at samba.org
samba-bugs at samba.org
Sat May 23 22:30:49 UTC 2020
https://bugzilla.samba.org/show_bug.cgi?id=14371
Haravikk <samba at haravikk.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|WONTFIX |---
Status|RESOLVED |REOPENED
--- Comment #6 from Haravikk <samba at haravikk.com> ---
In fact, no it doesn't, hide does not work as I'm requesting with
--delete-excluded enabled, everything that is excluded is still destroyed on
the receiving side:
mkdir src
mkdir dest
touch src/file1
touch src/file2
touch dest/file2
touch dest/file3
rsync -ri --delete-excluded -filter 'H file3' --exclude 'file2' src/ dest/
Note that only file2 exists in both directories initially, meanwhile file1
exists only in the source, and file3 exists only in the destination. I want
file1 to be transferred, file2 to be deleted in the destination, and file3 to
be preserved in the destination.
In other words the result that I want to get is:
*deleting file2
>f..T....... file1
The result I actually get is:
*deleting file2
*deleting file3
>f..T....... file1
So hide definitely doesn't do what I want.
Meanwhile protect alone doesn't either, because while it won't delete file3, it
will still compare it between src/ and dest/ and overwrite it with changes,
which I don't want either.
So I'm sorry but I'm re-opening this as it is not a case that appears to be
covered by existing rules. I need rsync to NOT scan or send a pattern, but
without deleting it either. As mentioned in the first post, this only seems to
be possible through the use of two rules, and a shorthand form of this would
still be beneficial.
--
You are receiving this mail because:
You are the QA Contact for the bug.
More information about the rsync
mailing list