Feature Request - recursive --delete with --files-from=

Andrew Boettcher a.boettcher at gmail.com
Sat Jun 21 22:19:39 GMT 2008


I am currently running into an annoying problem.  I have a list of files I
get from an SQL query and pass to rsync to fetch for a local cache.  I need
to delete the files that are not on the list.  Right now my command looks
something like:
[SQL query] | sed 's/^/+ /;/$/a\+ \*/\n- \*' | rsync -avm --progress
--delete-before --delete-excluded --recursive --include-from=- $SRC $DST

with the sed adding the lines "+ */" and "- *" on the end, and "+ " on the
start of each line.  Since --files-from (which could take my file list
without modification) does not work recursively, --delete doesnt work.  Even
with the line I use above I still have a problem - rsync wants to
recursively scan ALL directories on $DST, very inefficient.  It would be
nice if it could simply ask for the files in the list, and delete anything
in $DST recursively that did not fit.

Andrew Boettcher
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the rsync mailing list