backups in fedora
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 ?
Thanks !
regards
David
Quoted 5 lines · david carvalho
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
Quoted 8 lines
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).
Signature · 1 line
James Antill <[email protected]>
Hi !
Thanks for the reply.
It doesn't work, though.
I've made a simple backup of /var/www/html, wich contains type httpd_sys_content_t
attribute, from root's home.
pwd: /root
tar --xattrs -cvf backup.tar /var/www/html
When extracting, the /root/var/www/html files don't have the same attributes like they used to have under /var/www/html.
So, I can only conclude, once again, that or the attributes aren't being taken at backup time
or restore time..
Any ideas ?
Thanks
Regards
David
----- Original Message -----
From: "James Antill" <[email protected]>
To: "david carvalho" <[email protected]>
Cc: <[email protected]>
Sent: Friday, June 22, 2007 4:31 PM
Subject: Re: backups in fedora
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.