Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
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 '11 at 10:28

1 Answer 1

up vote 1 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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