rsync -a --update resets status of newer target directories

Arvid Requate requate at
Wed Jan 15 14:14:36 MST 2014


On 15.01.2014 18:18:13, Matthias Schniedermeyer wrote:
> As rsync is a tool for unidirectional(!) synchronization of differences
> between file-trees. I would think: Yes. That is intended behaviour.
> I don't seen an option to only exclude directories if newer, but there
> is an option to ignore directory-times completely: --omit-dir-times

just to avoid a misunderstanding: I was referring to the status of directories 
(mtime, ownership, etc.), not to the files contained below them.

My intention is to let rsync treat the status of directories just like it 
treats the status of plain files:

If the option "--update" is specified, it should IMHO only modify the status of 
a target directory if its modification time is not newer than that of the 
source directory.

It may be a question of debate how to behave if the directory content changed, 
but if it did not change, and the target is newer, then I would expect "--
update" to protect the target from regressive status changes. This is how it 
works for files. Is there any technical reason why it this option apparently 
has not effect in the case of directories?

Dr. Arvid Requate
Open Source Software Engineer
Univention GmbH
be open.
28359 Bremen
Tel. : +49 421 22232-52
Fax : +49 421 22232-99

requate at

Geschäftsführer: Peter H. Ganten
HRB 20755 Amtsgericht Bremen
Steuer-Nr.: 71-597-02876

More information about the rsync mailing list