When using --delete with --files-from, files that already exist in the destination that are not included in the transfer are not deleted as expected.
To reproduce:
> mkdir test
> touch test/test
> mkdir test2
> touch test2/test2
> echo test > list
> rsync -av --delete --files-from=list test/ test2/
building file list ... done
test
sent 114 bytes received 35 bytes 298.00 bytes/sec
total size is 0 speedup is 0.00
> ls test2
test test2
>
As can be seen in this example, the test2 file still remains in the destination directory even though it was not given in --files-from and was not part of the transfer.
Also tried adding both --delete-excluded and -r, and even with these --delete still seems to have no effect.
rsync 3.2.7 on Debian 11 amd64
When using
--deletewith--files-from, files that already exist in the destination that are not included in the transfer are not deleted as expected.To reproduce:
As can be seen in this example, the
test2file still remains in the destination directory even though it was not given in--files-fromand was not part of the transfer.Also tried adding both
--delete-excludedand-r, and even with these--deletestill seems to have no effect.rsync 3.2.7 on Debian 11 amd64