On Thu, 15 Mar 2001, Ben Hyatt wrote:

> I have 8 samba shares which get backed up - due to open files I get a lot
> of errors from samba.
> 
> I added 2 samba shares to the disklist (previous instance had 6 samba shares
> defined) my previous reports were never this big.

you can patch amanda to be less verbose when samba (or other) errors are
encountered.  you only need to do this on the samba client that is the
host for the smbclient backups.  that is, if your disklist looks like:

host1 //pchost/driveC comp-user-tar
host1 //pchost/driveD comp-user-tar

host2 / comp-user

you only need to patch amanda for host1.

there are two patches you can apply that affect two different aspects of
the smbclient backup.

1) client-src/sendbackup-gnutar.c
look for this code segment:

#ifdef IGNORE_SMBCLIENT_ERRORS
  /* This will cause amanda to ignore real errors, but that may be
   * unavoidable when you're backing up system disks.  It seems to be
   * a safe thing to do if you know what you're doing.  */
  { DMP_NORMAL, "^ERRDOS - ERRbadshare opening remote file", 1},
  { DMP_NORMAL, "^ERRDOS - ERRbadfile opening remote file", 1},
  { DMP_NORMAL, "^ERRDOS - ERRnoaccess opening remote file", 1},
  { DMP_NORMAL, "^ERRSRV - ERRaccess setting attributes on file", 1},
  { DMP_NORMAL, "^ERRDOS - ERRnoaccess setting attributes on file", 1},
#endif

if you define IGNORE_SMBCLIENT_ERRORS then these smbclient error messages
will be treated as DMP_NORMAL and they will not cause a full error report
to be generated (ie. amanda will output all messages from the dump if any
non-DMP_NORMAL lines are detected.  this is the problem you are seeing.).

you can define IGNORE_SMBCLIENT_ERRORS in your configure stage by, for
example, putting the following in config.site:

CFLAGS=-DIGNORE_SMBCLIENT_ERRORS


2) if you don't care to see any DMP_NORMAL lines in the report, only
DMP_STRANGE lines, look at client-src/sendbackup.c for this code:

    typ = parse_dumpline(str);
    switch(typ) {
    case DMP_NORMAL:
    case DMP_SIZE:
        startchr = '|';
        break;
    default:
    case DMP_STRANGE:
        startchr = '?';
        break;
    }
    fprintf(stderr, "%c %s\n", startchr, str);

and add a "return" statement after the "case DMP_NORMAL" line:

    case DMP_NORMAL:
        return;

so that the fprintf is not called for DMP_NORMAL lines.  the downside to
this is that you will not see any of the possibly useful DMP_NORMAL
information when there is a DMP_STRANGE error.  this could make debugging
the problem more difficult.  it would be useful if this was a run-time
configurable feature.

--
Todd Pfaff                         \  Email: [EMAIL PROTECTED]
Computing and Information Services  \ Voice: (905) 525-9140 x22920
ABB 132                              \  FAX: (905) 528-3773
McMaster University                   \
Hamilton, Ontario, Canada  L8S 4M1     \


Reply via email to