On Thu, 2008-09-04 at 17:52 +0200, Julian Pace Ross wrote: > Is it possible to perform the following for moved files (i.e. files that > already exist on destination, but are moved into a different or new dir on > the source): > > - generate filelist including deleted files (without deleting) > - during transfer, for each *new* file, check against above list for > deletions. > - If there is a match, and size is similar, try using that file as a basis > for transfer. > - finally delete all... (like --delete-after) > > All this would be sort of related to the --fuzzy option, but for moved files > instead of renamed. This would be especially useful for scripts that deal > with a few large files that sometimes change place, are dumped into archive > dirs etc...
The --detect-renamed option added by detect-renamed.diff does essentially this, except that it checks each deleted file against the list of new files rather than vice versa. This technique was probably easier to implement before incremental recursion because a full list of the source was available, but it fails for moves into directories that haven't yet been created and doesn't extend nicely to detecting copies. I would like to have an implementation that checks each new file against the list of existing destination files; I'm not sure whether it would be better to generate the list first (as you described) or postpone new transfers to a second pass after the whole destination is scanned (as the current implementation does). Neither technique would interfere with the use of incremental recursion on the source. Matt
signature.asc
Description: This is a digitally signed message part
-- 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
