On Thursday 17 December 2020 01:58:27 Gene Heskett wrote:
> On Wednesday 16 December 2020 21:38:12 Nathan Stratton Treadway wrote:
> > 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".
>
> Here is the completed output of that command:
> root@coyote:~$ su amanda -c "/usr/local/sbin/amstatus Daily"
> configuration error - unknown item 'ALWAYS_SET_PATH' (notify
> administrator) Using: /usr/local/var/amanda/Daily/amdump.1
> From Wed Dec 16 02:01:04 EST 2020
>
> GO704:/etc 20201216020104 1 0m
> dump done, written ( 2:03:55) GO704:/home
> 20201216020104 1 0m dump done, written ( 2:03:55)
> GO704:/lib/firmware 20201216020104 0 17m
> dump done, written ( 2:08:48) GO704:/root
> 20201216020104 1 0m dump done, written ( 2:03:55)
> GO704:/usr/lib/amanda 20201216020104 1 0m
> dump done, written ( 2:03:55) GO704:/usr/local
> 20201216020104 0 12m dump done, written ( 2:09:02)
> GO704:/var/backups 20201216020104 0 5m
> dump done, written ( 2:03:55) GO704:/var/lib/amanda
> 20201216020104 2 0m dump done, written ( 2:09:04)
> coyote:/CoCo 20201216020104 1 0m
> dump done, written ( 2:15:44) coyote:/GenesAmandaHelper-0.61
> 20201216020104 1 0m dump done, written ( 2:12:43)
> coyote:/GenesAmandaHelper-0.61/config-bak 20201216020104 2 882m
> dump done, written ( 2:12:42) coyote:/bin
> 20201216020104 1 0m dump done, written ( 2:16:00)
> coyote:/boot 20201216020104 1 0m
> dump done, written ( 2:15:49) coyote:/etc
> 20201216020104 1 0m dump done, written ( 2:15:45)
> coyote:/home/amanda 20201216020104 1 0m
> dump done, written ( 2:11:42) coyote:/home/gene
> 20201216020104 1 685m dump done, written ( 2:11:16)
> coyote:/home/gene/Documents 20201216020104 1 0m
> dump done, written ( 2:15:48) coyote:/home/gene/Download
> 20201216020104 1 0m dump done, written ( 2:11:48)
> coyote:/home/gene/LCNC-isos 20201216020104 1 0m
> dump done, written ( 2:15:59) coyote:/home/gene/Mail
> 20201216020104 1 50m dump done, written ( 2:11:38)
> coyote:/home/gene/Music 20201216020104 1 0m
> dump done, written ( 2:15:56) coyote:/home/gene/Pictures
> 20201215020105 0 0m flush failed ( 2:03:55)
> coyote:/home/gene/Pictures 20201216020104 1 0m
> dump done, written ( 2:15:41) coyote:/home/gene/PublicB
> 20201216020104 1 0m dump done, written ( 2:15:55)
> coyote:/home/gene/Videos 20201216020104 1 0m
> dump done, written ( 2:15:58) coyote:/home/gene/src
> 20201216020104 1 1m dump done, written ( 2:11:40)
> coyote:/home/nut 20201216020104 1 0m
> dump done, written ( 2:11:50) coyote:/home/ups
> 20201216020104 1 0m dump done, written ( 2:11:49) coyote:/lib
> 20201216020104 1 0m dump done,
> written ( 2:15:43) coyote:/opt
> 20201216020104 1 4m dump done, written ( 2:15:31) coyote:/root
> 20201216020104 1 1m dump done,
> written ( 2:15:32) coyote:/sbin
> 20201216020104 1 0m dump done, written ( 2:15:54)
> coyote:/usr/bin 20201216020104 0 385m
> dump done, written ( 2:14:48) coyote:/usr/dlds/books
> 20201216020104 0 210m dump done, written ( 2:14:51)
> coyote:/usr/dlds/misc 20201216020104 1 0m
> dump done, written ( 2:15:53) coyote:/usr/dlds/tgzs
> 20201216020104 1 0m dump done, written ( 2:15:51)
> coyote:/usr/games 20201216020104 1 0m
> dump done, written ( 2:16:03) coyote:/usr/include
> 20201216020104 1 0m dump done, written ( 2:15:38)
> coyote:/usr/lib 20201216020104 1 12m
> dump done, written ( 2:15:18) coyote:/usr/local
> 20201216020104 1 26m dump done, written ( 2:15:13)
> coyote:/usr/movies 20201216020104 1 0m
> dump done, written ( 2:15:46) coyote:/usr/music
> 20201216020104 1 0m dump done, written ( 2:15:50)
> coyote:/usr/pix 20201216020104 0 7688m
> dump done, written ( 2:14:24) coyote:/usr/sbin
> 20201216020104 1 0m dump done, written ( 2:16:07)
> coyote:/usr/share 20201216020104 1 30m
> dump done, written ( 2:15:02) coyote:/usr/src
> 20201216020104 1 0m dump done, written ( 2:15:36) coyote:/var
> 20201216020104 1 571m dump done,
> written ( 2:14:29) coyote:Downloadsal
> 20201216020104 1 0m dump done, written ( 2:11:46)
> coyote:Downloadsmz 20201216020104 0 1036m
> dump done, written ( 2:04:24) coyote:POA.stf
> 20201216020104 1 0m dump done, written ( 2:16:04)
> coyote:PublicAAZ 20201216020104 1 0m
> dump done, written ( 2:16:06) coyote:PublicAaq
> 20201216020104 1 0m dump done, written ( 2:16:05)
> coyote:PublicAr09 20201216020104 1 0m
> dump done, written ( 2:16:01) lathe:/etc
> 20201216020104 1 0m dump done, written ( 2:03:55) lathe:/home
> 20201216020104 0 63m dump done,
> written ( 2:09:45) lathe:/lib/firmware
> 20201216020104 1 0m dump done, written ( 2:03:55) lathe:/root
> 20201216020104 1 0m dump done,
> written ( 2:03:55) lathe:/usr/lib/amanda
> 20201216020104 1 0m dump done, written ( 2:03:55)
> lathe:/usr/local 20201216020104 0 0m
> dump done, written ( 2:09:49) lathe:/usr/src
> 20201216020104 0 0m dump done, written ( 2:03:55)
> lathe:/var/backups 20201216020104 1 2m
> dump done, written ( 2:09:47) lathe:/var/lib/amanda
> 20201216020104 1 0m dump done, written ( 2:03:55) rpi4:/bin
> 20201216020104 1 0m dump done,
> written ( 2:10:09) rpi4:/boot
> 20201216020104 1 0m dump done, written ( 2:10:24) rpi4:/etc
> 20201216020104 1 0m dump done,
> written ( 2:10:14) rpi4:/lib
> 20201216020104 1 0m dump done, written ( 2:10:23)
> rpi4:/media/pi/workspace 20201216020104 1 252m
> dump done, written ( 2:10:08) rpi4:/sbin
> 20201216020104 0 4m dump done, written ( 2:08:30)
> rpi4:/usr/bin 20201216020104 1 1m
> dump done, written ( 2:10:12) rpi4:/usr/lib
> 20201216020104 0 1458m dump done, written ( 2:08:28)
> rpi4:/usr/sbin 20201216020104 0 5m
> dump done, written ( 2:08:33) shop:/etc
> 20201216020104 1 0m dump done, written ( 2:04:24) shop:/home
> 20201216020104 1 0m dump done,
> written ( 2:04:05) shop:/lib/firmware
> 20201216020104 1 0m dump done, written ( 2:04:42) shop:/root
> 20201216020104 1 0m dump done,
> written ( 2:05:01) shop:/usr/lib/amanda
> 20201216020104 0 1m dump done, written ( 2:03:55)
> shop:/usr/local 20201216020104 0 0m
> dump done, written ( 2:09:21) shop:/var/amanda
> 20201216020104 0 0m dump done, written ( 2:09:39)
> shop:/var/lib/amanda 20201216020104 1 0m
> dump done, written ( 2:03:55)
>
> SUMMARY dle real estimated
> size size
> ---------------- ---- --------- ---------
> disk : 78
> estimated : 78 13308m
> flush : 1 10629m
> dump failed : 0 0m ( 0.00%)
> wait for dumping: 0 0m ( 0.00%)
> dumping to tape : 0 0m 0m ( 0.00%) ( 0.00%)
> dumping : 0 0m 0m ( 0.00%) ( 0.00%)
> dumped : 78 13416m 13308m (100.81%) (100.81%)
> wait for writing
> wait to flush
> writing to tape
> dumping to tape
> failed to tape : 1 10629m 0m ( 0.00%) ( 79.87%)
> taped : 78 13416m 13308m (100.81%) (100.81%)
> tape 1 : 79 24046m 24046m ( 37.57%) Dailys-21 (79
> parts)
>
> 5 dumpers idle : no-dumpers
> Daily qlen: 0
> 0:
>
> network free kps: 6500
> holding space : 196m (100.00%)
> chunker0 busy : 0:13:01 ( 86.50%)
> chunker1 busy : 0:07:19 ( 48.57%)
> chunker2 busy : 0:03:15 ( 21.61%)
> chunker3 busy : 0:01:22 ( 9.13%)
> chunker4 busy : 0:00:09 ( 1.06%)
> dumper0 busy : 0:12:57 ( 85.98%)
> dumper1 busy : 0:07:17 ( 48.45%)
> dumper2 busy : 0:03:14 ( 21.48%)
> dumper3 busy : 0:01:21 ( 8.99%)
> dumper4 busy : 0:00:09 ( 1.00%)
> Daily busy : 0:01:26 ( 9.58%)
> 0 dumpers busy : 0:05:49 ( 38.70%) client-constrained: 0:00:40 (
> 11.59%) no-bandwidth: 0:03:06 ( 53.28%) no-dumpers: 0:00:01 (
> 0.34%) not-idle: 0:02:01 ( 34.79%) 1 dumper busy : 0:02:09 (
> 14.31%) client-constrained: 0:00:02 ( 1.74%) no-bandwidth:
> 0:02:07 ( 98.26%) 2 dumpers busy : 0:04:57 ( 32.95%)
> no-bandwidth: 0:04:57 (100.00%) 3 dumpers busy : 0:01:55 ( 12.74%)
> no-bandwidth: 0:01:55 (100.00%) 4 dumpers busy : 0:00:10 (
> 1.12%) no-bandwidth: 0:00:10 (100.00%) 5 dumpers busy :
> 0:00:01 ( 0.18%) no-bandwidth: 0:00:01 (100.00%)
>
> > 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
>
> fixed, and amanda will run in 5 minutes, its scheduled for 2AM, 1:55
> now normally takes around 35 minutes.
>
> BUT Whats line 2 above, I've wasted a year looking for that, it does
> not grep in the whole src code tree.
>
> > 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
Done finally, left stuff in dumps. And that line shows an empty
parts-written: here is dd.report-Dailys-22
============
11
This script is being run as /GenesAmandaHelper-0.61//bak-indices-configs
Daily 22
using tape Dailys-22
tar up the indices and configs directories as they exist now.
In bak-indices-configs DUMMY=0
Parts written =
Dailys-22 was not written to as amstatus Daily reported it had not
written any partitions to tape.
===============
Which confirms the diagnosis. /sdb/dumps/today has
root@coyote:config-bak$ ls -l /sdb/dumps/20201217020105/
total 7310680
-rw------- 1 amanda amanda 2097152000 Dec 17 02:26 coyote._usr_src.0
-rw------- 1 amanda amanda 2097152000 Dec 17 02:19 coyote._usr_src.0.1
-rw------- 1 amanda amanda 2097152000 Dec 17 02:21 coyote._usr_src.0.2
-rw------- 1 amanda amanda 1194660163 Dec 17 02:26 coyote._usr_src.0.3
and the email complains about a bad crc.
> >
> > --------------------------------------------------------------------
> >-- ------ 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
>
> Copyright 2019 by Maurice E. Heskett
> Cheers, Gene Heskett
Copyright 2019 by Maurice E. Heskett
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
If we desire respect for the law, we must first make the law respectable.
- Louis D. Brandeis
Genes Web page <http://geneslinuxbox.net:6309/gene>