bug-tar
[Top][All Lists]
Advanced

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

[Bug-tar] A bug involving cat and multi-volume archives


From: TJ
Subject: [Bug-tar] A bug involving cat and multi-volume archives
Date: Thu, 25 Nov 2004 11:58:44 -0500
User-agent: KMail/1.6.2

Please CC me, as I'm not on the list, thanks!

I use multi-volume tar archives to backup a RAID array. If I want to restore a 
file that spans two archives, I can do this:

ln -s /mnt/cdrom/archive.1.tar ./arc
tar -xMf arc

Then, when tar asks for the next archive, I hit Ctrl-Z, do:
rm ./arc
ln -s /mnt/cdrom/archive.2.tar ./arc
fg

and everything works fine. It would be much easier to simply do:

cat /mnt/cdrom/archive.[1-2].tar | tar -xM

Because tar recieved the M flag, it should understand that an EOF means that 
it has recieved the next archive and restore the file that spans the archive 
properly. It won't do this, though, with or without the M flag. I have tested 
all cases using cksum to verify the result. The filesize is correct, but the 
cksum doesn't match up.

If it is too much trouble to make tar understand cat'd multi-volume archives, 
it should at least print a more obvious error. For example, if I untar a 
single file of the multi-volume archive it errors at the end of the file:

$ tar -xf /mnt/cdrom/archive.1.tar
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
$

This error makes it obvious that something is wrong. However, if you:

cat /mnt/cdrom/archive.[1-2].tar | tar -x

Tar merely returns "Skipping to next header" which sounds as if it is reading 
the multi-volume archives correctly. In this case, it should return some form 
of error along with the "Skipping to next header" message.

Thanks,
TJ Harrell




reply via email to

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