On Fri, Mar 11, 2011 at 02:17:49PM -0600, Derek Martin wrote:
> On Fri, Mar 11, 2011 at 05:50:34PM +0000, Chris G wrote:
> > On Tue, Mar 08, 2011 at 02:40:06PM -0800, John Magolske wrote:
> > > I'd like the original (source) mailboxes to retain their N's, I'm not
> > > concerned about copying over this to the backup copy.
> > > 
> > That's because rsync is changing the *access* time of the 'source'
> > mailboxes isn't it, I'm not sure you can stop it doing this.
> 
> YOU ABSOLUTELY CAN, by using rsync -t as I've said several times now.
> 
[snip]
> So, as I've already said several times now, rsync -t absolutely is the
> solution.
> 
I just did some tests too, rsync doesn't change the access time even
without using -t as far as I can tell.

I have a python script called lt that shows all three times associated
with a file, so:-

    chris$ lt again.rtf

    Times for file again.rtf
    2010-04-27  18:31:35.00 Modifed
    2010-11-24  09:03:51.00 Accessed
    2010-04-27  18:31:35.00 Status changed

    chris$ rsync -t again.rtf /tmp/again.rtf
    chris$ lt /tmp/again.rtf

    Times for file /tmp/again.rtf
    2010-04-27  18:31:35.00 Modifed
    2011-03-12  18:27:16.00 Accessed
    2011-03-12  18:27:16.73 Status changed

So, rsync -t leaves the original file's access time unchanged and copies
the modification time to the destination.


    chris$ rsync again.rtf /tmp/again.rts
    chris$ lt again.rtf

    Times for file again.rtf
    2010-04-27  18:31:35.00 Modifed
    2010-11-24  09:03:51.00 Accessed
    2010-04-27  18:31:35.00 Status changed

    chris$ lt /tmp/again.rtf

    Times for file /tmp/again.rtf
    2010-04-27  18:31:35.00 Modifed
    2011-03-12  18:27:16.00 Accessed
    2011-03-12  18:27:16.73 Status changed

... and without the -t rsync *doesn't* copy the modification time to the
destination but *still* leaves the access time of the original unchanged.

-- 
Chris Green

Reply via email to