From: James Antill <jantill@redhat.com>
To: david carvalho <david@di.ubi.pt>
Cc: selinux@tycho.nsa.gov
Subject: Re: backups in fedora
Date: Fri, 22 Jun 2007 11:31:02 -0400 [thread overview]
Message-ID: <1182526262.31779.64.camel@code.and.org> (raw)
In-Reply-To: <078701c7b4dd$009d7640$fd01000a@ubi.pt>
[-- 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 --]
next prev parent reply other threads:[~2007-06-22 15:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-22 14:52 backups in fedora david carvalho
2007-06-22 15:31 ` James Antill [this message]
2007-06-25 13:50 ` david carvalho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1182526262.31779.64.camel@code.and.org \
--to=jantill@redhat.com \
--cc=david@di.ubi.pt \
--cc=selinux@tycho.nsa.gov \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.