5 messages in org.samba.lists.rsyncrsync feature needed: preserve atime
FromSent OnAttachments
Brent ThompsonMay 8, 2007 11:00 pm 
Matt McCutchenMay 8, 2007 11:09 pm 
Dave DykstraMay 9, 2007 7:35 pm 
Matt McCutchenMay 9, 2007 10:47 pm 
Paul SlootmanMay 11, 2007 11:13 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:rsync feature needed: preserve atimeActions...
From:Matt McCutchen (hash@gmail.com)
Date:May 9, 2007 10:47:40 pm
List:org.samba.lists.rsync

On 5/9/07, Dave Dykstra <dw@drdykstra.us> wrote:

What does it really mean to preserve access times? When rsync reads a file to copy it, it will change the access time just because it is reading it, so the backup should then have the correct access time, the time the backup file was created.

I tested HEAD of rsync + atimes.diff and it indeed behaves this way, which is silly: rsync destroys the data it is told to preserve! The atimes.test doesn't catch this because it uses a zero-length file, so there is no read to actually hit the atime.

Some tools have an option to reset the access time of the file they copy, but in so doing the tools update the inode change time of the input file which is generally more important to users than access time. It is not possible to preserve both as a filesystem user like rsync.

It is possible on some filesystems to read a file without hitting its atime by opening it with O_NOATIME. The same issues apply to GNU tar, so there was an extensive discussion on the bug-tar mailing list of how not to destroy atimes of source files (including use of O_NOATIME):

http://lists.gnu.org/archive/html/bug-tar/2005-09/msg00035.html

Personally, I don't like access times because they're impure in the sense that reading shouldn't write and as far as I know they don't have any important uses. All of my computer's filesystems are mounted noatime.

Matt