[lug] ftp problem

Daniel Webb lists at danielwebb.us
Thu Mar 10 15:34:08 MST 2005


On Tue, Mar 08, 2005 at 02:24:07PM -0700, George Sexton wrote:

> There are known problems with using compression options in tar. It's safer
> for compression to use an external program that compresses the tarred data.
> As I recall, it was some sort of padding issue that happens. The tar archive
> doesn't get padded to the correct multiple length when using compression.
> 
> It could be this is a bzip2 only problem, or it could be any compression
> program. I tried finding my references again, and I can't. But, this is a
> real problem.

It's much worse than that.  tar with compression does the same thing as:

tar c files | gzip > tarfile.tgz

This is a really stupid thing to do, because gzip (and bzip2) are really
bad at recovering from corruption.

tar is a disaster waiting to happen when used with the -z or -j options
for backups.  afio is far superior, because it compresses each file
independently, and uses uncompressed cpio format headers.  afio has a
zillion options, so I wrote a script to make it easier to use.  I
haven't gotten it ready for public release, but if anyone's interested
I'll do it soon.  I've mainly just been waiting for gpg-agent to be
released for Debian (where the heck is it??) so the encryption option
will work.



More information about the LUG mailing list