tar: Damaged tar archive, Retrying...

Polytropon freebsd at edvax.de
Tue Jul 14 00:10:05 UTC 2015


On Tue, 14 Jul 2015 02:40:00 +0300, Nikos Vassiliadis wrote:
> 
> 
> On 07/13/15 23:57, Polytropon wrote:
> > On Mon, 13 Jul 2015 20:40:02 +0300, Nikos Vassiliadis wrote:
> >> Hi,
> >>
> >> I am currently using tar to copy some very files to another host and
> >> got this:
> >>> tar: Damaged tar archive
> >>> tar: Retrying...
> >>> tar: Damaged tar archive
> >>> tar: Retrying...
> >>> tar: Damaged tar archive
> >>> tar: Retrying...
> >>> tar: Damaged tar archive
> >>> tar: Retrying...
> >>> tar: Damaged tar archive
> >>
> >> The copy is done using tar|nc and nc|tar on the receiving host.
> >> This looks like a bug and I wonder whether the copy is OK.
> >
> > Create a checksum list on the source and the target machine,
> > them compare both. This should give you a good overview of
> > the files to be identical.
> 
> For sure a checksum will do that. I am lucky that the system has an
> SSD, those files are huge. Results:
>    Two out of three files are OK. One was removed, maybe the one
>    that printed out the warnings.

While md5 doesn't provide you an exact 1:1 comparison of files,
it's good to spot irregularities, as you could see. So there
really is something different on the target side.



> This is definitely something that should be further investigated:)

If you grep through the sources, you'll find that the error
message originates from libarchive, not tar itself (directly).

Involved files:

/usr/src/lib/libarchive/archive_read_support_format_tar.c

/usr/src/usr.bin/tar/read.c

Is there a significant version mismatch between source and
target system? It shouldn't affect readability of tar archives
(simply because tar is _the_ universal archiving format
across operating systems), but maybe you can check that.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list