mtime, atime, ctime - Tools

This is a discussion on mtime, atime, ctime - Tools ; Hello I am making backup of a Plesk Debian server to /backup using Rsync. My questioin is how can I preserve the ctime, mtime, and atime of original files? Thanks -- Please use reply-all for most replies to avoid omitting ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: mtime, atime, ctime

  1. mtime, atime, ctime

    Hello
    I am making backup of a Plesk Debian server to /backup using Rsync.

    My questioin is how can I preserve the ctime, mtime, and atime of
    original files?

    Thanks
    --
    Please use reply-all for most replies to avoid omitting the mailing list.
    To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
    Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html


  2. Re: mtime, atime, ctime

    On Sun, 2008-08-24 at 14:24 +0200, Mikel Jimenez wrote:
    > I am making backup of a Plesk Debian server to /backup using Rsync.
    >
    > My questioin is how can I preserve the ctime, mtime, and atime of
    > original files?


    - Preserving the mtime is just rsync's --times (-t) option.

    - To preserve the atime, you'll need a copy of rsync containing the
    atimes patch:

    http://rsync.samba.org/ftp/rsync/patches/atimes.diff

    Then use the --atimes option. Unfortunately, this patch makes no effort
    to avoid hitting the atimes of the source files; you might want to
    either hack do_open in syscall.c to add the O_NOATIME flag or enable the
    "noatime" mount option on the source filesystem during the backup.

    - Linux filesystems generally don't allow the ctime to be set to a time
    other than the current one. I suppose a process running as root could
    preserve ctime by repeatedly changing the system clock, but that might
    have nasty consequences elsewhere. If you are sure you need to preserve
    ctimes, I would recommend doing a block-level copy of the filesystem.

    Matt

    --
    Please use reply-all for most replies to avoid omitting the mailing list.
    To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
    Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.9 (GNU/Linux)

    iEYEABECAAYFAkixzAoACgkQC+xSYN/RlftZ/gCfTM/3Lqv/15wo0FykeVyLNNGC
    1scAoINLTylQZLkxMZLbRdEmA0+a6/9Q
    =7m1m
    -----END PGP SIGNATURE-----


+ Reply to Thread