[kwlug-disc] So why not tar -cf tarball.tar a.xz b.xz c.xz, instead of tar -cJf tarball.tar.xz a b c ?
Chris Frey
cdfrey at foursquare.net
Fri Nov 4 13:59:31 EDT 2016
On Fri, Oct 28, 2016 at 07:00:20PM -0400, B.S. wrote:
> You lost me there, at "then going to the trouble of compressing first may
> not gain much." - seems to be saying not worth going through the trouble of
> compressing.
>
> Which seems to be inconsistent with where you've been coming from / what
> you've been saying - so I doubt that's what you mean. (Not that you've
> beating anything in particular particularly.)
>
> It does seem arguable to not compress at all, though, given compressing /
> deduping filesystems.
[...]
> What isn't compelling is 'gzip file.tar' going bad, with zip metadata
> throughout, rendering the entire tar broken. vs. Individual gzip tar'red -
> broken gzip files being easier to skip over in tar, by having tar just skip
> to the next file header.
In your original example, the comparison was between tarring pre-compressed
files in a plain .tar file vs. compressing a tar of uncompressed files.
I was saying that if you can recover from both compressed and uncompressed
tar files, the advantage of pre-compressing may not be so stark.
In my brief reading and tests, It seemed possible to recover from both.
In both cases, it appeared that I would need some special tools: ft for
fixing tar, and gzrt for fixing gzip. (I haven't tested gzrt yet).
So for pre-compressed plain tarballs, the recovery would be:
1) use ft to fix the tarball
2) use gzrt to try to recover something from the file
For tar.gz, it would be:
1) use gzrt to recover the plain tarball
2) use ft to fix the tarball and extract good files
- Chris
More information about the kwlug-disc
mailing list