Re: Amrecover hangs after restore
Nathan Stratton Treadway <[email protected]>
| Newsgroups | gmane.comp.archivers.amanda.user |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Dec 14, 2020 at 14:04:40 -0500, Gene Heskett wrote: > On Monday 14 December 2020 11:32:56 Nathan Stratton Treadway wrote: > > > On Sun, Dec 13, 2020 at 03:05:16 -0500, Gene Heskett wrote: > > > ./bak-indices-configs: line 135: [: -gt: unary operator expected > > > > There does seem to be an error message coming from the amstatus > > program which we can investigate later, but as far as your own script > > not doing the coping I think that might be explained by the above > > error message. > > > > So, what's on line 135 of the bak-indices-configs script? > > > That is a very long if else fi thing, wordwrap off: > ------------------------------------------- > if [ $PARTS_WRITTEN -gt 0 ]; then > if [ $DUMMY -eq 1 ] ; then Seems like the only occurrence of "-gt" is in the $PARTS_WRITTEN line. The output you quoted in your earlier email mentions Parts written = >> dd.report.Dailys-17 . Does that mean that the PARTS_WRITTEN variable actaully contained the value ">> dd.report.Dailys-17"? That would definitely not parse out well in the if condition... If add quotes around the variable (i.e. you change that line to if [ "$PARTS_WRITTEN" -gt 0 ]; then ), I think that would prevent the script from erroring out at that spot (and is generally a good idea). However, this does lead to the followup question of how PARTS_WRITTEN is (supposed to be) getting set in the first place? (Given the other parts of your original email, I'll hazard a guess that the script is trying to parse the output of amstatus, but the parsing code is confused by the warning message amstatus is currently generating....) 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