On Wed, Dec 16, 2020 at 16:41:39 -0500, Gene Heskett wrote:
> So here is the that script------
>
Okay, a couple things:
> PARTS_WRITTEN=`${AM_SBIN_DIR}/amstatus $CONFIGNAME | grep taped | awk -F:
> '{print $2}' | awk '{print $1}'`
If you run "amstatus" manually, what does your "taped" section look like
now?
On my Amanda v3.5 box with dumps going to two separate storages, I get:
=====
taped
TestBackup : 3 6085m 6061m (100.39%) (100.39%)
tape 1 : 3 6085m 6085m ( 2.97%) TESTBACKUP-12 (3 parts)
TestOffsite : 3 6085m 6061m (100.39%) (100.39%)
tape 1 : 3 6085m 6085m ( 2.97%) TESTBACKUP-103 (3 parts)
=====
, but your script clearly expects the parts-written figure to be on the
same line as the word "taped".
So I'm pretty sure you need to upgrade your script to support amstatus's
new formatting in v3.5... but I'm not sure exactly what changes that
would require in your setup (i.e. the output may be different with only
one storage in use, etc.).
(Note that because of this issue I don't think adding quote characters to
the -gt line will actually fix the script: the expression
[ "" -gt 0 ]
will fail with a different error than
[ -gt 0 ]
... but neither one is valid.)
> # Ok, then lets make it part of the dd.report record
> echo "Parts written = $PARTS_WRITTEN >> dd.report.$TAPENAME"
Okay, this is what produced the output line I found interesting in your
earlier email.
First thing is that this line actaully has a misplaced " character so
it's not doing what the comment describes. (It's writing to
standard output instead of to the dd.report.$TAPEname file.) Instead
you want to say
echo "Parts written = $PARTS_WRITTEN" >> dd.report.$TAPENAME
on that line of the script.
But in spite of that issue, the corresponding line in the log you posted
earlier confirms that PARTS_WRITTEN was empty in that run, which indeed
explains the syntax error you got from the "-gt" line of the script.
Nathan
----------------------------------------------------------------------------
Nathan Stratton Treadway - [email protected] - 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