# create an archive including xattrs
star -xattr -H=exustar -c -f foo.tar
# extract the archive, preserving any xattrs in it
star -x -f foo.tar
rsync also has support for xattr preservation (-X, --xattrs), at least in FC4.
An option for GNU tar might be to selectively apply restorecon to the files you are extracting if they are being extracted to the same path on the destination machine as on the source machine and both machines have the same policy, e.g.:
tar xvf foo.tar | xargs /sbin/restorecon
Brak komentarzy:
Prześlij komentarz