Re: prevent filter excluded files from being deleted
Heiko Schlittermann via rsync <[email protected]>
| Newsgroups | gmane.network.rsync.general |
|---|---|
| Organization | schlittermann -- internet & unix support |
| Message-ID | <[email protected]> |
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 -- 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
signature.asc
(application/pgp-signature, 488 B)
-----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEE0L/WueylaUpvFJ3Or0zGdqa2wUIFAmQHKZQACgkQr0zGdqa2 wUL6QQf/USOgqd95mMYT1did2uCd4kz2OkazGSYdo7aqsMsbAKXSZijeVTMs5y+A dr5uyBWOkekM54hbgesAJrXqowZV97f4CPFx+qKJllYXu6uYsLim9VWfbhi06Gkj Ea2R7MVOeoBXfjzSNj8T0sueX7mf1/sAcSlA3tzbR0GRIiakRbtqmPrDWp1fVVbe Tz8dllR7cVfbunvhbGLhEKbPCSRqIoy/LlN0tZA29pifNlxvISFSueys0zA7c6Id usGbwnGhRbgM8dzzZBV8yR9GmONBsj59Ncud/EtT5UEfVq+4ow5IPAnnuCcfMrwu ARIKe8WGWmApkV9Mymam2umifDgg0w== =BjnC -----END PGP SIGNATURE-----