Amanda-Users

Re: incremental with gnutar bogusly dumping old files

2007-09-28 09:07:56
Subject: Re: incremental with gnutar bogusly dumping old files
From: John E Hein <jhein AT timing DOT com>
To: "Dustin J. Mitchell" <dustin AT zmanda DOT com>
Date: Fri, 28 Sep 2007 07:09:30 -0600
Dustin J. Mitchell wrote at 21:00 -0500 on Sep 27, 2007:
 > 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.

Ummm... oh.
How about having the amanda build include the source
code for gtar directly (just kidding, mostly)?

Actually, using FreeBSD's libarchive (upon which bsdtar is built) is a
possibility, but doesn't fully include incremental support at the
moment (it can parse gtar files including the non-posix bits, but not
the snapshot files).  I don't know if/when Tim Kientzle was planning
to add that.


 > > 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?

It (not --ignore-devno-change specifically) was suggested at least once...

http://lists.gnu.org/archive/html/bug-tar/2005-01/msg00047.html

One email in this thread suggests an option (--just-snapshot) that
can update the gnutar-list file after the devno changes.

If I come up with a patch, I'll drop it on the tar lists (and here).