samba-bugs@samba.org
2004-Jul-03 01:12 UTC
[Bug 1479] --compare-dest suppresses output file if same timestamp present
https://bugzilla.samba.org/show_bug.cgi?id=1479 wayned@samba.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED ------- Additional Comments From wayned@samba.org 2004-06-25 19:12 ------- Yes, it certainly can seem counter intuitive that the files that match in the compare-dest dir don't get copied into the real destination directory. A better solution than messing up the timestamps in the compare-dest dir is to just specify the -I option (which turns off the size+time quick check, causing all the files to be updated, and the unchanged files will get copied from the compare-dest dir). It does cause all the matching files to get read on both machines, though, which could be optimized a little if you are willing to do some scripting. For instance, if the amount of changed data is not large, you could first copy the compare-dest dir to the new destionation and then rsync the data from the remote system without using compare-dest. This saves the remote read, but is not optimal if lots of files were changed. Another potentially workable solution is to start with the same compare-dest copy that you're doing now, and follow it with an rsync of the compare-dest dir to the new destination dir using the --update (-u) option. As long as you know that the changed files will have more recent timestamps than the older files in the compare-dest dir, all the files in the new destination dir will be left alone. If that is too risky for you, you could make a note of all the files that get transferred in the first rsync (i.e. use -v and filter the output into a file list) and then use that file list as an exclusion list for the extra copy (input it it into --exclude-from). I'll also accept this request for an enhancement. If rsync had either the --copy-dest option you suggest or an --exclude-existing option this would be easier to do. -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact.
Reasonably Related Threads
- [Bug 1479] New: --compare-dest suppresses output file if same timestamp present
- [Bug 1479] request the addition of a --copy-dest option that would copy identical files
- [Bug 12036] New: Multiple --link-dest, --copy-dest, or --compare-dest flags produce incorrect behavior
- [Bug 9657] New: --compare-dest results inconsistent between major 2 and major 3
- DO NOT REPLY [Bug 5647] New: A way to make earlier --compare-dest dirs hide later ones