Fwd: amgtar: defaults for NORMAL and STRANGE

2021-01-20 Thread Tom Robinson
-- Forwarded message -
From: Tom Robinson 
Date: Thu, 21 Jan 2021 at 09:13
Subject: Re: amgtar: defaults for NORMAL and STRANGE
To: Nathan Stratton Treadway 


On Wed, 20 Jan 2021 at 16:09, Nathan Stratton Treadway 
wrote:

> On Wed, Jan 20, 2021 at 14:22:02 +1100, Tom Robinson wrote:
> > I'm still seeing messages in the report that should have been squashed.
> It
> > also doesn't matter what I have configured as 'NORMAL' for the
> application
> > configuration.
> >
> > STRANGE DUMP DETAILS:
> >   /-- lambo.motec.com.au / lev 1 STRANGE
> >   sendbackup: info BACKUP=APPLICATION
> >   sendbackup: info APPLICATION=amgtar
> >   sendbackup: info RECOVER_CMD=/usr/bin/gzip -dc
> > |/usr/lib64/amanda/application/amgtar restore [./file-to-restore]+
> >   sendbackup: info COMPRESS_SUFFIX=.gz
> >   sendbackup: info end
> >   | /usr/bin/tar: ./dev: directory is on a different filesystem; not
> dumped
> >   | /usr/bin/tar: ./proc: directory is on a different filesystem; not
> dumped
> >   | /usr/bin/tar: ./run: directory is on a different filesystem; not
> dumped
> >   | /usr/bin/tar: ./sys: directory is on a different filesystem; not
> dumped
> >   | /usr/bin/tar: ./mnt/s3backup: directory is on a different
> filesystem; not dumped
> >   | /usr/bin/tar: ./var/lib/nfs/rpc_pipefs: directory is on a different
> filesystem; not dumped
> >   ? /usr/bin/tar: ./mnt/s3backup: Warning: Cannot flistxattr: Operation
> not supported
>
> [...]
> > property"NORMAL" ": socket ignored$"
> > property append "NORMAL" ": file changed as we read it$"
> > property append "NORMAL" ": directory is on a different filesystem;
>
> Note that the man page explaination of NORMAL includes the sentence
> 'These output are in the "FAILED DUMP DETAILS" section of the email
> report if the dump result is STRANGE'.
>
> In this case, the "Operation not supported" message is considered
> STRANGE... which in turn causes all the NORMAL message lines to be
> included in the report output as well.
>
>
I see. I've been working backwards on this. I was trying to squash the
'NORMAL' messaging to make the STRANGE results more clear! I've fixed the
'Operation not supported' issue and the 'NORMAL' messages have gone, too.
Amanda now produces a clean report.



> So presumably once you resolve all of those error messages for a
> particular DLE, that DLE will no show up with a STRANGE DUMP DETAILS
> section at all, in which case those NORMAL-category messages will no
> longer be included in the report.
>
>
Correct.

Thanks for clarifying Nathan.

Kind regards,
Tom


Re: amgtar: defaults for NORMAL and STRANGE

2021-01-19 Thread Nathan Stratton Treadway
On Wed, Jan 20, 2021 at 14:22:02 +1100, Tom Robinson wrote:
> I'm still seeing messages in the report that should have been squashed. It
> also doesn't matter what I have configured as 'NORMAL' for the application
> configuration.
> 
> STRANGE DUMP DETAILS:
>   /-- lambo.motec.com.au / lev 1 STRANGE
>   sendbackup: info BACKUP=APPLICATION
>   sendbackup: info APPLICATION=amgtar
>   sendbackup: info RECOVER_CMD=/usr/bin/gzip -dc
> |/usr/lib64/amanda/application/amgtar restore [./file-to-restore]+
>   sendbackup: info COMPRESS_SUFFIX=.gz
>   sendbackup: info end
>   | /usr/bin/tar: ./dev: directory is on a different filesystem; not dumped
>   | /usr/bin/tar: ./proc: directory is on a different filesystem; not dumped
>   | /usr/bin/tar: ./run: directory is on a different filesystem; not dumped
>   | /usr/bin/tar: ./sys: directory is on a different filesystem; not dumped
>   | /usr/bin/tar: ./mnt/s3backup: directory is on a different filesystem; not 
> dumped
>   | /usr/bin/tar: ./var/lib/nfs/rpc_pipefs: directory is on a different 
> filesystem; not dumped
>   ? /usr/bin/tar: ./mnt/s3backup: Warning: Cannot flistxattr: Operation not 
> supported

[...]
> property"NORMAL" ": socket ignored$"
> property append "NORMAL" ": file changed as we read it$"
> property append "NORMAL" ": directory is on a different filesystem;

Note that the man page explaination of NORMAL includes the sentence
'These output are in the "FAILED DUMP DETAILS" section of the email
report if the dump result is STRANGE'.

In this case, the "Operation not supported" message is considered
STRANGE... which in turn causes all the NORMAL message lines to be
included in the report output as well.

So presumably once you resolve all of those error messages for a
particular DLE, that DLE will no show up with a STRANGE DUMP DETAILS
section at all, in which case those NORMAL-category messages will no
longer be included in the report.

(You could prevent those messages from ever showing up in the report by
setting them to IGNORE in the config file, but in general I'd say trying
to fix the underlying cause of a STRANGE status is preferable to
suppressing messages completely)


Does that explain the behavor you were seeing?


Nathan



Nathan Stratton Treadway  -  natha...@ontko.com  -  Mid-Atlantic region
Ray Ontko & Co.  -  Software consulting services  -   http://www.ontko.com/
 GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt   ID: 1023D/ECFB6239
 Key fingerprint = 6AD8 485E 20B9 5C71 231C  0C32 15F3 ADCD ECFB 6239


Re: amgtar: defaults for NORMAL and STRANGE

2021-01-19 Thread Tom Robinson
Hi Nathan,

Thanks for your insights and help.

On Tue, 19 Jan 2021 at 17:24, Nathan Stratton Treadway 
wrote:

> On Tue, Jan 19, 2021 at 11:53:52 +1100, Tom Robinson wrote:
> >
> > Also, the man page says there are defaults for NORMAL and STRANGE but
> these
> > 'defaults' don't seem to be included into the application definition
> when I
> > dump the config information with amadmin daily config:
>
> [...]
> > Is the man page incorrect? Are the 'defaults' really applied or do I have
> > to manually specify them in the config file?
>
> I haven't looked closely at this functionality before, but from a quick
> skim of the code in application-src/amgtar.c, it looks like those
> default values are built directly in to the program itself.
>
> That is, they aren't implemented as part of the config system and thus
> don't show in the output of "amadmin ... config", but they do indeed
> exist underneath the hood.
>

Ah, that explains it. Although it is somewhat confusing to not see that in
the config file at first.


> (As a corollary to that, it seems like there isn't any way to completely
> delete the default strings from amgtar's processing, though you can
> override the treatment of a particular regex by explicitly specifying
> it as another type in the config file.)
>
>
> (Are you seeing any situations where it looks like the default strings
> aren't being applied as you would have expected from the man page
> description?)
>
>
CentOS Linux release 8.2.2004 (Core)
amanda 3.5.1

I'm still seeing messages in the report that should have been squashed. It
also doesn't matter what I have configured as 'NORMAL' for the application
configuration.

STRANGE DUMP DETAILS:
  /-- lambo.motec.com.au / lev 1 STRANGE
  sendbackup: info BACKUP=APPLICATION
  sendbackup: info APPLICATION=amgtar
  sendbackup: info RECOVER_CMD=/usr/bin/gzip -dc
|/usr/lib64/amanda/application/amgtar restore [./file-to-restore]+
  sendbackup: info COMPRESS_SUFFIX=.gz
  sendbackup: info end
  | /usr/bin/tar: ./dev: directory is on a different filesystem; not dumped
  | /usr/bin/tar: ./proc: directory is on a different filesystem; not dumped
  | /usr/bin/tar: ./run: directory is on a different filesystem; not dumped
  | /usr/bin/tar: ./sys: directory is on a different filesystem; not dumped
  | /usr/bin/tar: ./mnt/s3backup: directory is on a different filesystem;
not dumped
  | /usr/bin/tar: ./var/lib/nfs/rpc_pipefs: directory is on a different
filesystem; not dumped
  ? /usr/bin/tar: ./mnt/s3backup: Warning: Cannot flistxattr: Operation not
supported
  | /usr/bin/tar: ./var/lib/sss/pipes/nss: socket ignored
  | /usr/bin/tar:
./var/lib/sss/pipes/private/sbus-dp_implicit_files.558138: socket ignored
  | /usr/bin/tar: ./var/lib/sss/pipes/private/sbus-dp_implicit_files.782:
socket ignored
  | /usr/bin/tar: ./var/spool/postfix/private/anvil: socket ignored
  | /usr/bin/tar: ./var/spool/postfix/private/bounce: socket ignored
  | /usr/bin/tar: ./var/spool/postfix/private/defer: socket ignored
  | /usr/bin/tar: ./var/spool/postfix/private/discard: socket ignored
  | /usr/bin/tar: ./var/spool/postfix/private/error: socket ignored
  Look in the
'/var/log/amanda/log.error/lambo.motec.com.au._.1.20210120132743.errout'
file for full error messages
  \

More configs:

DLE:
lambo.motec.com.au / {
comp-root-amgtar
}

dumptypes:
define dumptype global {
comment "Global definitions"
auth "bsdtcp"
exclude list optional ".amanda.excludes"
}
define dumptype root-amgtar {
global
program "APPLICATION"
application "app_amgtar"
comment "root partitions dumped with tar"
compress none
index
priority low
}
define dumptype comp-root-amgtar {
root-amgtar
comment "Root partitions with compression dumped with tar"
compress client fast
}
Application:

Note that this config setting:

define application-tool app_amgtar {
comment "amgtar"
plugin  "amgtar"
property "XATTRS" "YES"
property "ACLS" "YES"
#property "GNUTAR-PATH" "/path/to/gtar"
#property "GNUTAR-LISTDIR" "/path/to/gnutar_list_dir"
property"NORMAL" ": socket ignored$"
property append "NORMAL" ": file changed as we read it$"
property append "NORMAL" ": directory is on a different filesystem; not
dumped$"
}

AND this config setting:

define application-tool app_amgtar {
comment "amgtar"
plugin  "amgtar"
property "XATTRS" "YES"
property "ACLS" "YES"
#property "GNUTAR-PATH" "/path/to/gtar"
#property "GNUTAR-LISTDIR" "/path/to/gnutar_list_dir"
#property"NORMAL" ": socket ignored$"
#property append "NORMAL" ": file changed as we read it$"
#property append "NORMAL" ": directory is on a different filesystem;
not dumped$"
}

give the same results in the report.

Kind regards,
Tom


Re: amgtar: defaults for NORMAL and STRANGE

2021-01-18 Thread Nathan Stratton Treadway
On Tue, Jan 19, 2021 at 11:53:52 +1100, Tom Robinson wrote:
> 
> Also, the man page says there are defaults for NORMAL and STRANGE but these
> 'defaults' don't seem to be included into the application definition when I
> dump the config information with amadmin daily config:

[...]
> Is the man page incorrect? Are the 'defaults' really applied or do I have
> to manually specify them in the config file?

I haven't looked closely at this functionality before, but from a quick
skim of the code in application-src/amgtar.c, it looks like those
default values are built directly in to the program itself.  

That is, they aren't implemented as part of the config system and thus
don't show in the output of "amadmin ... config", but they do indeed
exist underneath the hood.  

(As a corollary to that, it seems like there isn't any way to completely
delete the default strings from amgtar's processing, though you can
override the treatment of a particular regex by explicitly specifying
it as another type in the config file.)


(Are you seeing any situations where it looks like the default strings
aren't being applied as you would have expected from the man page
description?)

Nathan



Nathan Stratton Treadway  -  natha...@ontko.com  -  Mid-Atlantic region
Ray Ontko & Co.  -  Software consulting services  -   http://www.ontko.com/
 GPG Key: http://www.ontko.com/~nathanst/gpg_key.txt   ID: 1023D/ECFB6239
 Key fingerprint = 6AD8 485E 20B9 5C71 231C  0C32 15F3 ADCD ECFB 6239