rsync -a doesn't copy ext3 attributes

Jonas Pasche jpasche at jonaspasche.com
Wed Feb 2 05:17:35 MST 2011


Hi folks,

I just stumbled upon the fact that rsync doesn't preserve at least the
ext3 "immutable" flag - while it should do so when using -a, IMHO. Quick
test case (tested on CentOS 5.5 w/ rsync 2.6.8 as well as on Fedora 13
w/ rsync 3.0.7):

        # touch testfile
        # chattr +i testfile
        # rsync -a testfile testfile2
        # lsattr testfile*
        ----i---------- testfile
        --------------- testfile2

The man page of rsync comments on an example using "rsync -avz":

        The files are transferred in "archive" mode, which ensures that
        symbolic links, devices, attributes, permissions, ownerships,
        etc. are preserved in the transfer.

For clarification: The immutable flag has nothing to do with *extended*
attributes which could be synced with -X. The immutable flag is an
attribute, not an extended attribute. In addition, even -aX does not
preserve the immutable flag.

Can somebody please shed some light on this: What's meant by
"attributes" here if not the attributes of the underlying filesystem? If
it really means something other: Is there a possibility to sync ext3
attributes as well?

Thanks,
Jonas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/rsync/attachments/20110202/5f8bc536/attachment.pgp>


More information about the rsync mailing list