Hello listers,

I do not seem to be able to find a combination of rsync switches that
updates destination directory only if the contents of the files
changes *and* preserves files' original timestamps.

What I've tried so far:

1. --checksum --size-only --ignore-times with or without --times switch.
2. --modify-window=4294967295
3. --size-only w/o --times and with -I (upper case i)

The results: either timestamp gets set whenever there is a difference
in the timestamps between src and dst, or the timestamp of the
transmission gets set for the files in the destination.

rsync 2.6.3, Solaris 2.8

Example of a desired behavior.

I have directories /tmp/a  and /tmp/b with the following files:
/tmp/a:
-rw-r--r--   1 user  group          0 Mar 27 17:22 a
-rw-r--r--   1 user  group          0 Mar 27 17:22 b

/tmp/b:
-rw-r--r--   1 user  group          0 Mar 26 16:44 a
-rw-r--r--   1 user  group          0 Mar 26 16:44 b

I want rsync switches that won't update /tmp/b in above case, but if
/tmp/b is empty, I want /tmp/b/a and /tmp/b/b files to be created with
"Mar 27 17:22" timestamp.

Thank you,

Eugene.
-- 
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Reply via email to