All of lore.kernel.org
 help / color / mirror / Atom feed
* backups in fedora
@ 2007-06-22 14:52 david carvalho
  2007-06-22 15:31 ` James Antill
  0 siblings, 1 reply; 3+ messages in thread
From: david carvalho @ 2007-06-22 14:52 UTC (permalink / raw)
  To: selinux

[-- Attachment #1: Type: text/plain, Size: 495 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1178 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: backups in fedora
  2007-06-22 14:52 backups in fedora david carvalho
@ 2007-06-22 15:31 ` James Antill
  2007-06-25 13:50   ` david carvalho
  0 siblings, 1 reply; 3+ messages in thread
From: James Antill @ 2007-06-22 15:31 UTC (permalink / raw)
  To: david carvalho; +Cc: selinux

[-- Attachment #1: Type: text/plain, Size: 1589 bytes --]

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 <jantill@redhat.com>

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: backups in fedora
  2007-06-22 15:31 ` James Antill
@ 2007-06-25 13:50   ` david carvalho
  0 siblings, 0 replies; 3+ messages in thread
From: david carvalho @ 2007-06-25 13:50 UTC (permalink / raw)
  To: James Antill, selinux

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" <jantill@redhat.com>
To: "david carvalho" <david@di.ubi.pt>
Cc: <selinux@tycho.nsa.gov>
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 majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-25 13:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-22 14:52 backups in fedora david carvalho
2007-06-22 15:31 ` James Antill
2007-06-25 13:50   ` david carvalho

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.