rsync: always modify atime of all destination files

Matt McCutchen matt at
Mon Mar 10 12:51:19 GMT 2008

On Thu, 2008-03-06 at 11:38 -0500, Justin Pryzby wrote:
> On Fri, Jul 23, 2004 at 05:09:09PM -0300, Pedro Zorzenon Neto wrote:
> >   Please apply the following patch to rsync. This patch updates the
> > atime (last access time) of all destination files to NOW when rsync
> > runs.
> > 
> >   It is desirable to know if a file has been deleted in then source
> > and exists in destination. Checking destination computer for atime,
> > you can know how long this file has been removed from source, and
> > remove it after some months to keep disk space in backups.

I don't think this behavior would be useful to enough people to justify
adding it to the official rsync, even as an option.  Also, I think the
atime, however convenient, is a poor way to store file expiration
information because it can easily be modified accidentally by reading a
file and it is not preserved if the backup itself is migrated with

An alternative that is well-supported by rsync is to use --delete with a
different --backup-dir for each run and delete backup dirs as they
become 60 days old.


More information about the rsync mailing list