I need to transfer files with extended attributes from my local system (SL 6.5) to a remote server (Centos 5.6). However, both scp
and rsync
are dropping the attributes, so I'm having to manually setfattr
on the server. Any pointers on how to do this properly? Thanks.
Asked
Active
Viewed 1,975 times
2
-
I have no centos 5.6 system handy, but on 6.5 you can use the -X, --xattrs for rsync and that should work. You can also use tar, it takes the attributes unless you specify not to take them with you with --no-xattrs – natxo asenjo Jun 10 '14 at 08:40
1 Answers
3
AFAIK scp doesn't.
rsync has the -X, --xattrs
switch for extended attributes (think SELinux contexts) and the -A, --acls
to preserve ACL's, which are what you modify with setfattr.

HBruijn
- 77,029
- 24
- 135
- 201
-
Side note - just tried this - `rsync -avX` preserves whatever was set by `setfattr`, even though `-a` doesn't include `-A`. – EML Jun 10 '14 at 08:53