rsync to sync time without attempting to modify the content
Wayne Davison
wayned at samba.org
Sun May 19 17:19:11 MDT 2013
On Tue, Apr 2, 2013 at 12:07 PM, Brice Rebsamen <brice.rebsamen at gmail.com>wrote:
> So what I want, is to be able to compare files this way:
>
> if the file does not exist at the destination, then transfer it with
> timestamps (rsync -t)
> otherwise:
> if timestamps and sizes are different:
> if md5sums match
> if the source time stamp is earlier than the destination
> timestamp
> update the timestamp of the destination
> otherwise report (in a log file or something so that I can come
> back to those later)
>
You can use rsync to help with that, but it won't do it for you. For
instance, the first part can be done by specifying --ignore-existing (so
that rsync just copies in missing files). You could then get a list of
files that differ in their timestamp by running a --dry-run with
--itemize-changes. If you use --checksum, it will differentiate
between identical files and those that are different, but it will take a
huge amount of time to checksum all files. Instead, you may want to just
have rsync list all the files that differ by time and you then put them
into a --files-from file for rsync to check via --dry-run and --checksum.
..wayne..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20130519/ae5760c5/attachment.html>
More information about the rsync
mailing list