files' timestamp handling - bug or design decision?
jav9d2p02 at sneakemail.com
Thu Mar 31 19:07:07 GMT 2005
> I want to be able to do two things together:
> -- transfer files from the source to destination only if the files'
> contents is changed
Consider: -W -x --delete --delete-excluded --log-format='%i %f'
Use --dry-run when testing for the right configuration to avoid data loose.
> -- when the files are transfered, I want to preserve original timestamp
> By looking at the switches available in rsync, I assumed that a
> combination of --times and --checksum would do what I want, but
> apparently, --times not only tells rsync to preserve timestamps on
> transfer, but also to consider the files for the transfer if there is
> a discrepancy in the mtime of the files.
rsync's defaults is pretty sane, and does what you want in most cases. Try
rsync -avr --dry-run
and see, if this doesn't solve your needs.
More information about the rsync