Amanda-Users

Re: incremental with gnutar bogusly dumping old files

2007-09-27 21:59:25
Subject: Re: incremental with gnutar bogusly dumping old files
From: "Dustin J. Mitchell" <dustin AT zmanda DOT com>
To: "John E Hein" <jhein AT timing DOT com>
Date: Thu, 27 Sep 2007 21:00:01 -0500
On 9/27/07, John E Hein <jhein AT timing DOT com> wrote:
>  > > And maybe adding a "devno changed" check in amcheck would be nice -
>  > > the client has the gnutar-list files, so it would require some work in
>  > > the client side of amcheck.
>  >
>  > This might be an interesting addition to the GNU Tar application, when
>  > it's complete.  I'm not sure if there's a good way to stuff it into
>  > the current implementation.
>
> I think a check is higher level than gtar.  What would you do?  Have
> gtar grow yet another -- option, say
> --check-for-incremental-devno-change?  Or perhaps spew a warning if
> the devno for an otherwise identical file is different?  Unfortunately
> it's harder to generically code a check into gtar if not using
> --one-file-system (which allows you to assume devno is the same
> throughout the file).  If it's got a mix of devnos, you might have to
> check the entire snapshot file to see if any device numbers have
> changed.

Ah -- "GNU Tar Application" in this context means the Amanda
application that drives GNU Tar -- part of the Application API.  So
GNU Tar itself wouldn't grow a new option.  Rather, the application
(in essence, a wrapper on steroids) would perform that check manually,
using the method you suggested.

> But now you have add specific knowledge of the
> gtar file format to amanda, and I agree that's not so good (and this
> point also applies to the sed above).

This is a good point, and probably the most significant reason *not*
to make this change.  I'm not sure it's a showstopper, though,
particularly now that the GNU Tar formats are well-documented.

> I could definitely see adding a gtar option that could be used to
> ignore devno changes, say --ignore-devno-change, that is used with
> --listed-incremental.  Then you could avoid having to do the sed
> described above.  And that should be a tiny code change to gtar (in
> theory - </me says without looking at the source>).

It's worth suggesting such an option on the Tar mailing list, to see
what Sergey thinks.  From my memory of the Tar code, that would indeed
be a fairly trivial change.  I don't remember if that particular
solution was suggested before -- perhaps Gene remembers, or perhaps
the tar-bugs archive can tell you?

Dustin

-- 
Storage Software Engineer
http://www.zmanda.com