[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] RFE? tar doesn't copy file attributes or ACL's (full permi

From: Andreas Dilger
Subject: Re: [Bug-tar] RFE? tar doesn't copy file attributes or ACL's (full permissions)
Date: Mon, 03 Aug 2009 01:59:18 -0600
User-agent: Mutt/1.5.18 (2008-05-17)

On Aug 02, 2009  12:41 -0700, Linda A. Walsh wrote:
> Would it be possible to get tar to copy (or ignore) file attributes, and 
> to copy ACL's if they exist ( maybe via an option)?
> Some attr's I really like to keep on files, and end up having to use  
> something a host of different utils (depending on fs and os), but
> common examples are the '+d" 'don't dump' attribute -- something I
> usually set on large multi-gig scratch files I'm using for testing,
> or temporary copies of DVD's on my disk (certainly don't need to back
> up such things as the original is the DVD -- much better than trying
> to use backup space).

This kind of file attribute (nodump, immutable, append-only, etc) isn't
backed up by tar yet, not even the ones that already back up extended
attributes (e.g. recent RHEL/FC tar with xattr patches).

> ACL's -- those would be most useful for me under Cygin-Windows.  Cygwin
> uses Windows ACL's itself for emulating the standard unix rwx permisions
> for groups, but native ACL's are also set for existing files that it 
> would be nice if they could be kept in a backup. (Since Window's
> native backup seems to die about 165G into its backup attempt (I think
> it is actually 'finished', and dies during final 'housekeeping').

ACLs are backed up by the patched RHEL/FC tar programs.

> I'd rather save it in a standard format if I could (i.e. tar)...
> Of course on Win, it has underlying file attribs as well, (HSRA...)

It might be possible that DOS/FAT/NTFS already have extensions to
backup/restore these attributes via tar, in which case they should
be extended to handle extN/xfs/jfs/btrfs/reiserfs attributes (which
are implemented with a common getattr() interface).

> Dunno how possible...but certainly the ext2+xfs 'd' attribs
> and file ACLS's -- it'd be up to the support libraries to actually
> be available to be able to pull the values in so 'tar' could store
> them.  
> _Maybe_ for Backwards compat such info could be stored ahead of a file
> in some variation of the filename?  Like if fn="filename", then store 
> attribs in .filename#.%attrib%.<hex-numbered ext>, if need to avoid fn 
> collisions?  

Probably the easiest way to back these attributes up would be to store
them in a "virtual" extended attribute in a very simple (text?) encoding.
One possibility is like:


and if such an xattr is seen during file restore it is converted to the
apropriate bitfields and set via setattr().

Cheers, Andreas
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]