On Fri, Feb 01, 2013 at 01:06:14PM +1100, Dmitry Smirnov wrote:
[... snipped part about backing up ext4 and restoring on btrfs ...]
> "Failed to set file flags" on nearly all directories in archive.
> 
> I don't quite understand why. I've made archive as root and I was restoring 
> it 
> as root. I used the most straightforward `bsdtar` command: "-c" to create 
> archive and "-x" to extract.

A quick look at the source tells me libarchive has support for storing
ext2 filesystem attributes (like immutable, etc).
(IIRC this is only done when bsdtar is run as root.)
When the tarball has these attributes stored, attempt is made
to restorte them on extraction - which fails on btrfs (any any other
non-ext filesystem?!).

The code is found in ./libarchive/archive_write_disk_posix.c function
set_fflags_platform (). (Note that it's the second variant that gets
used because configure doesn't find neither fchflags, lchflags or chflags
when building on Debian.)

So much for the explanation of the current behaviour.... Now I'm curious
what you expected?

Not warning about the failure to restore file metadata would not be a
good idea in my humble opinion. Potentially libarchive could be enhanced
to detect the target filesystem type and maybe somehow there's a way
to map ext2 attributes to btrfs attributes, I don't know....


-- 
Andreas Henriksson


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to