On Wed, Sep 10, 2003 at 01:06:45PM +1000, Martin Pool wrote: > On 9 Sep 2003 "Saylor, Ted" <[EMAIL PROTECTED]> wrote: > > > I find rsync an excellent tool when I need to move multi-gigabyte > > filesystems, because I can do most of the copying during the week - > > then a quick cleanup sweep in our 4 hour outage window. > > > > I do need to somehow get the atime's to copy over, because as it > > stands now I loose the age information (which we will soon be using > > for auto-archiving) on things I copy with rsync. > > > > Would it be that hard to enhance rsync to copy the atime along with > > the current mtime info? > > > > Does anyone have a speedy script, perl, or C program to "cleanup" the > > atime after the final rsync is done? > > You don't say what operating system or filesystem you're using, but on > Linux there is no standard way to change the atimes of a file, so > there is nothing rsync can do about it.
For Linux there is a standard way, utime(2). The very syscall rsync uses to set mtime. Martin may have confused it with ctime, for which there is no syscall. I believe utime is POSIX and SUS conformant so should apply to other most UNIXes. That doesn't mean that all filesystems will support it and there can be some rather strange semantics associated with atime, especially on directories. The usual atime related request is to reset it on the sender. You (Ted) should check the archives for a discussion on that issue. They would be illustrative of some of the issues with propagating atime. If you still want to try messing with atime you could create an rsync patch. The protocol change to send atime wouldn't be difficult. The difficulty is in preserving correct semantics. > If you persuade your friendly neighbourhood kernel hacker / vendor to > add an operation to do this then I suppose rsync could support it. -- ________________________________________________________________ J.W. Schultz Pegasystems Technologies email address: [EMAIL PROTECTED] Remember Cernan and Schmitt -- To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html