Using rsync for backup trashes st_atime

jw schultz jw at
Thu Oct 24 11:05:01 EST 2002

On Thu, Oct 24, 2002 at 12:16:26PM +0200, Jan-Benedict Glaw wrote:
> Hi!
> I've just tried to do a backup of a machine with rsync. While doing this
> (I was reading emails:-) I noted that mbox for mbox, I had no longe new
> mails, but I've never read off these mailboxes lately... This seemed to
> be a st_atime problem, and indeed, I could verify that. This is what I
> used for backup:
> I think '--preserve-server-atime' would be a nice additional feature,
> and I tend to implement it on monday or so. I haven't yet looked at the
> source, so there may be already a solution to this problem. If you think
> this is a nice feature, please give some response...

.from rsync3.txt by Martin Pool
|  - Propagate atimes and do not modify them.  This is very
|    ugly on Unix.  It might be better to try to add
|    O_NOATIME to kernels, and call that.

It would be better to call it --reset-access-time as cpio
does.  Not only to make it easier to remember (for those
using other tools) but to make it clear that the access time
is being reset to a value that will not reflect accesses by
other activity between initial stat and the final reset.

Beyond that I don't much care.  All my filesystems are mounted -o
noatime,nodiratime for efficiency. 
Personally, i think any MUA that depends on atime is broken by design.

	J.W. Schultz            Pegasystems Technologies
	email address:		jw at

		Remember Cernan and Schmitt

More information about the rsync mailing list