2 messages in org.samba.lists.rsyncmtime, atime, ctime
FromSent OnAttachments
Mikel JimenezAug 24, 2008 12:53 pm 
Matt McCutchenAug 24, 2008 9:00 pm 
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:mtime, atime, ctimeActions
From:Matt McCutchen (ma@mattmccutchen.net)
Date:Aug 24, 2008 9:00:53 pm
List:org.samba.lists.rsync

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