I was going to stay out of yet another round of "dump vs tar", but what
the hell.  Here's a little eye-opener for all you tar folks ...

  $ (umask 077 ; mkdir /tmp/jrj)
  $ cd /tmp/jrj
  $ rm z.tar zli
  $ cp /dev/null zli
  $ gtar --version
  tar (GNU tar) 1.13.19
  ...
  $ uname -srp
  SunOS 5.6 sparc
  $ gtar --create \
         --file - \
         --directory /work/tmp/resolv \
         --one-file-system \
         --listed-incremental /tmp/jrj/zli \
         --sparse \
         --ignore-failed-read \
         --totals \
         . > z.tar

This does what Amanda does for a full dump.  It creates an empty listed
incremental file then does the deed.  The /work/tmp/resolv directory has
four files in it and was just a random choice of something to test with:

  $ ls -lR /work/tmp/resolv
  /work/tmp/resolv:
  total 82
  -rwxr-xr-x   1 jrj      pucc       10412 Jun  8  1999 getMailHostName
  -rw-r--r--   1 jrj      pucc        3028 Jun  8  1999 getMailHostName.c
  -rw-r--r--   1 jrj      pucc       15044 Jun  7  1999 res_init.c
  -rw-r--r--   1 jrj      pucc       12170 Jun  7  1999 res_query.c

Here's the output of the gtar --create:

  Total bytes written: 10240 (10kB, 791kB/s)

Fine.  Everything's hunky, dory.  Hmmm, how about we do a "tar t" on
that:

  $ gtar tvf z.tar
  drwxr-xr-x jrj/pucc         62 1999-06-08 13:53:30 ./
  -rwxr-xr-x jrj/pucc      10412 1999-06-08 13:53:30 ./getMailHostName
  gtar: Unexpected EOF in archive
  gtar: Error is not recoverable: exiting now

Oh, shit.

I've tried this on several directories.  They all fail.  GNU tar (1.13.19)
is broken, at least on my Solaris box.  And because GNU tar didn't say
squat about any problems, you'd never know it happened unless you looked
really closely at the E-mail output (e.g. the dump size is too small),
or tried to do an amrecover (the file list would be wrong because the
"tar t" it runs would have failed) or a real restore.

I tried GNU tar 1.12 (plus the Amanda patches) and it works fine.

>You've been lucky for years.  Some day, [dump will] bite you, and you'll
>regretfully remember this discussion.  ...
>So your point is that dump should refuse to run on a mounted
>filesystem?  Yeah, that sounds reasonable to me.  Then more people
>would learn about its limitations and switch to some saner backup
>tool.

And which tool would that be?  :-)

I just found this problem a couple of days ago (while looking into
George Herson's problem) and haven't had time to start tracking it down
or report it.

But if'n I were you folks using this version of GNU tar, I'd start
making damn sure your tapes had anything even faintly useful on them.
Amverify should do the trick, although I certainly wouldn't stop there.

Not to panic you or anything, of course.  Have a nice day.  :-)

>Alexandre Oliva

John R. Jackson, Technical Software Specialist, [EMAIL PROTECTED]

Reply via email to