Subject: tar becomes (too ?) picky.
To: None <>
From: Martin Weber <>
List: current-users
Date: 05/05/2003 16:46:18

I have a backup script for my mails which does, among other things basically
the following:

 touch $TARFILE
 for i in <backup-list> ; do
   tar -rf $TARFILE $i || exit 1

Well. I'm failing with the funniest kinds of errors, and I wonder why 
it stopped working, or rather, if that is intended. Fwiw, I use that
script monthly, and last month it worked fine :)

The things I'm seeing when I'm doing the above (create an empty archive
with touch and then append to it) is:

	tar: Unexpected EOF on archive file

BUT it appends the file, and then (after imo successful operation) exits
1 ! *grumble*. Fine, I then created a file with some metadata which starts
out in the tar archive.

	echo "something" > meta
	tar -cf $TARFILE meta && rm -f meta

	for i in ... ; do
		tar -rf $TARFILE $i || exit 1

This works fine for the first two or three files then it spreads joy with

	tar: Unable to append, archive header flaw
	tar: Cannot append to an archive that may have flaws.

uh huh. So tar wants to say : "Pardon me, I was too dumb to create a flawless
header, have pity and don't use append" ?

Can anyone please tell me what I'm missing ? Thanks in advance,