4

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:

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

The man page of rsync tells about the -a switch:

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

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?

1
  • 1
    For clarification: This has nothing to do with extended attributes which could be synced with -X. The immutable flag is an attribute, not an extended attribute.
    – Jonas
    Feb 2, 2011 at 10:28

1 Answer 1

1

Not going to happen with rsync.

Rsync does it's best to backup any filesystem type and make it look the same on another filesystem type. so chattr +i is pretty ext* specific so rsync ignores those.

Rsync is more worried about permissions and ownership of the file.

You'd have to create some wrapper script around rsync to do that job

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.