Hello Kevin, Kevin Korb via rsync <[email protected]> (Di 07 Mär 2023 00:01:27 CET): > I am not 100% sure I am interpreting this correctly but I think you are > complaining that the file was being deleted in the first command? If so, > instead of -F try --include='*/' --exclude='*'. Otherwise, maybe you want a > second -F?
For the command line it works, but I'd like to have in a .rsync-filter
on a per directory basis.
> > a
> > ├── a-file
> > └── .rsync-filter
> >
> > b
> > └── a-file
Following your suggestion, I tried:
# .rsync-filter
+ */
- *
combined with this command
rsync --del -F -inav a/ b/
sending incremental file list
*deleting a-file
.d..t...... ./
Your suggestion (include/exclude on the command line) would work, but as
mentioned, it is not on a per directory basis
rsync --del --include='*/' --exclude='*' -inav a/ b/
sending incremental file list
.d..t...... ./
Even
rsync --del --filter='- *' -inav a/ b/
sending incremental file list
.d..t...... ./
does not remove the excluded files
So, why does rsync remove the files excluded via the .rsync-filter file,
but doesn't touch the files excluded with command line filters?
--
Heiko
signature.asc
Description: PGP signature
-- 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
