How do I make rsync ignore and not report or update certain parts of the [l]stat(2) struct or checksum when selecting which items to report or update in a hierarchy? For example, I want to run: rsync -Haxi --delete /hier1/ /hier2/ and have it NOT do anything if say ONLY the modtime differs. Leaving out or in the --times [-t] option from the expansion of -a to -rlptgoD obviously does not do this. That would be a pretty awesome feature to have :) Especially for where modtime is the only thing changed. Commonly caused by someone extracting a cp/tar/cpio/etc without preserving the modtime in particular. I would think the new ignore option bits would apply easily to at least the following fields: size [block or bytes] perms [ideally and optionally modified by some supplied ignore/watch mask] user group timestamp [birth/mod/access/change where applicable] flags checksum Comments on this?
On 05.01.2010 02:33, grarpamp wrote:> How do I make rsync ignore and not report or update certain parts > of the [l]stat(2) struct or checksum when selecting which items to > report or update in a hierarchy? > > For example, I want to run: > rsync -Haxi --delete /hier1/ /hier2/ > and have it NOT do anything if say ONLY the modtime differs. > Leaving out or in the --times [-t] option from the expansion of -a > to -rlptgoD obviously does not do this.That option can be easily missed it's: --size-only Bis denn -- Real Programmers consider "what you see is what you get" to be just as bad a concept in Text Editors as it is in women. No, the Real Programmer wants a "you asked for it, you got it" text editor -- complicated, cryptic, powerful, unforgiving, dangerous.
> That option can be easily missed it's: --size-onlyThat seems like at least part of what would be useful :) Certainly it covers the most common case of modtimes. However, it doesn't seem to work :( cp -p /etc/passwd a cp -p /etc/passwd b ls -liT a b 5 -rw-r--r-- 1 user wheel 1706 Dec 25 03:08:02 2009 a 6 -rw-r--r-- 1 user wheel 1706 Dec 25 03:08:02 2009 b touch a ls -liT a b 5 -rw-r--r-- 1 user wheel 1706 Jan 5 05:24:17 2010 a 6 -rw-r--r-- 1 user wheel 1706 Dec 25 03:08:02 2009 b rsync -Haxi --delete --size-only ./a ./b .f..t...... a ls -liT a b 5 -rw-r--r-- 1 user wheel 1706 Jan 5 05:24:17 2010 a 6 -rw-r--r-- 1 user wheel 1706 Jan 5 05:24:17 2010 b