On Fri, 2007-06-22 at 15:52 +0100, david carvalho wrote: > Hi ! > after I run a few tests, I've verified that "dump" can backup/restore > files > with selinu attributes. Later "tar" versions seem to do this also, but > when I extract > a tar archive with "--xattr" or "--selinux", the attributes aren't > there. > So there are 2 options. Or they aren't been created whith these > attributes, or it's > on the extraction stage. > Could you please provide me a simple example of tar creation and > extraction for > selinux/extended attributes ? From man tar: --acls this option causes tar to store each file’s ACLs in the archive. --selinux this option causes tar to store each file’s SELinux security context information in the archive. --xattrs this option causes tar to store each file’s extended attributes in the archive. This option also enables --acls and--selinux if they haven’t been set already, due to the fact that the data for those are stored in special xattrs. As the above implies tar doesn't automatically create archives with any xattrs in them. However if the information is there it will automatically use it on extraction. The simple create example is: tar --xattrs -cvf my-backup.tar ./path/to/backup …at which point extracting as normal will use that information (using --no-xattrs etc. will tell tar to ignore the information in an extracting archive). -- James Antill