"rsync --xattrs" cannot transfer SELinux extended file attributes when rsyncing files between x64 (Intel Xeon) systems running different versions of the Linux kernel -- e.g. source system running kernel 2.6.9, destination system running 2.6.18
# rsync --xattrs -zva -e ssh /root/mydir/ remote:/root/mydir
receiving incremental file list
created directory /root/mydir
rsync: rsync_xal_set: lsetxattr(".","security.selinux") failed: Invalid argument (22)
It's possible that the "lsetxattr" failure is caused by a fundamental change in the file system data structures implementing extended SELinux file attributes between Linux kernels 2.6.9 and 2.6.18
On the other hand, it might also be possible that the SELinux structures are actually compatible, and that the above error is just caused by some unsanitized parameter used in some function call...
Rsync doesn't currently support the weeding out of unwanted xattr names except in very limited circumstances: if it is running as a non-root user (or with --no-super), then all non user.* names are skipped. If you're backing up data, you can use --fake-super, which stores all non user.* attributes as specially encoded user.* attributes (using user.rsync.* names). If you're not backing up data, rsync currently only allows you to transfer non-user xattr data between compatible systems.
No conversion of the xattr values is supported (nor likely ever to be supported). I'm not sure how compatible se-linux xattr items are across systems, but if they are not portible, there is little that rsync can do about it. (It can be used to backup the attributes, but not help you make them work on another system.)
See bug 4573 for the enhancement request to allow xattr names to be filtered.
*** Bug 6312 has been marked as a duplicate of this bug. ***