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?
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