Bug#1011957: aideinit fails in amanda-server processing
On Tue, May 31, 2022 at 09:36:43PM +0200, Marc Haber wrote: > Hannes, do you want me to commit the fix or do you prefer doing it > yourself? Done via 778c4a0 Best regards Hannes
Bug#1011957: aideinit fails in amanda-server processing
On Tue, May 31, 2022 at 09:48:44AM -0500, Barry Trent wrote: > Yes. After applying this patch aideinit succeeds on all 3 machines I have it > running on with amanda-server Hannes, do you want me to commit the fix or do you prefer doing it yourself? Greetings Marc -- - Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany| lose things."Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421
Bug#1011957: aideinit fails in amanda-server processing
Yes. After applying this patch aideinit succeeds on all 3 machines I have it running on with amanda-server On 5/31/22 5:13 AM, Hannes von Haugwitz wrote: On Mon, May 30, 2022 at 09:46:30AM -0500, Barry Trent wrote: Applied the patch and added some blank lines back to the disklist. Still doesn't work. Argh, I overlooked the missing -E flag for grep. Please try again. diff --git a/debian/aide.conf.d/31_aide_amanda-server b/debian/aide.conf.d/31_aide_amanda-server index 5750779..7604e0f 100755 --- a/debian/aide.conf.d/31_aide_amanda-server +++ b/debian/aide.conf.d/31_aide_amanda-server @@ -66,7 +66,7 @@ for configfile in $(find /etc/amanda -name amanda.conf ! -path '/etc/amanda/temp printf "@@define AMANDA_INDEXDIR %s\\n" "${AMANDA_INDEXDIR}" if [ -f "disklist" ]; then while read -r host dev rest; do -if echo "${host}" | grep -q '^\\(#.*\\)\\?$'; then continue; fi +if echo "${host}" | grep -Eq '^(#.*)?$'; then continue; fi dev="$(echo "${dev}" | sed 's|[/:]|_|g;s|\\"||g')" if ! skip_multiline_dle; then printf "!/@@{AMANDA_INDEXDIR}/%s/%s/@@{YEAR4D}[0-9]{4}_[0123]\\.gz$ f\\n" "${host}" "${dev}" Best regards Hannes -- Barry A. Trent 952-829-5864 x109 barry.tr...@atcorp.com smime.p7s Description: S/MIME Cryptographic Signature
Bug#1011957: aideinit fails in amanda-server processing
On Tue, May 31, 2022 at 12:47:21PM +0200, Hannes von Haugwitz wrote: > On Tue, May 31, 2022 at 12:29:04PM +0200, Marc Haber wrote: > > how about > > > >cat --squeeze-blank disklist | while read ... > >done > > > > ? > > `--squeeze-blank` does only suppress repeated empty lines, (not > all blank lines) and does not suppress comment lines. You're right. Should we have a generic commentlesscat function that we can pass config files through? I guess we have this class of bugs in a lot of executable rules. Greetings Marc -- - Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany| lose things."Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421
Bug#1011957: aideinit fails in amanda-server processing
On Tue, May 31, 2022 at 12:29:04PM +0200, Marc Haber wrote: > how about > >cat --squeeze-blank disklist | while read ... >done > > ? `--squeeze-blank` does only suppress repeated empty lines, (not all blank lines) and does not suppress comment lines. Best regards Hannes
Bug#1011957: aideinit fails in amanda-server processing
Hi, thanks for helping, Hannes. I just had pretty busy days and didnt get around to respond. On Sat, May 28, 2022 at 09:10:45PM +0200, Hannes von Haugwitz wrote: > if [ -f "disklist" ]; then >while read -r host dev rest; do > -if echo "${host}" | grep -q '^\\(#.*\\)\\?$'; then continue; fi > +if echo "${host}" | grep -q '^(#.*)?$'; then continue; fi > dev="$(echo "${dev}" | sed 's|[/:]|_|g;s|\\"||g')" > if ! skip_multiline_dle; then > printf > "!/@@{AMANDA_INDEXDIR}/%s/%s/@@{YEAR4D}[0-9]{4}_[0123]\\.gz$ f\\n" "${host}" > "${dev}" how about cat --squeeze-blank disklist | while read ... done ? That being said, I'm contemplating to introduce the concept of "user-maintained rules" where the maintainers explicitly ask users to help with certain rules. I haven't used amanda in years, and it is pretty hard to maintain, debug and keep current complex rules for a package that we don't use ourselves. Greetings Marc -- - Marc Haber | "I don't trust Computers. They | Mailadresse im Header Leimen, Germany| lose things."Winona Ryder | Fon: *49 6224 1600402 Nordisch by Nature | How to make an American Quilt | Fax: *49 6224 1600421
Bug#1011957: aideinit fails in amanda-server processing
On Mon, May 30, 2022 at 09:46:30AM -0500, Barry Trent wrote: > Applied the patch and added some blank lines back to the disklist. Still > doesn't work. Argh, I overlooked the missing -E flag for grep. Please try again. diff --git a/debian/aide.conf.d/31_aide_amanda-server b/debian/aide.conf.d/31_aide_amanda-server index 5750779..7604e0f 100755 --- a/debian/aide.conf.d/31_aide_amanda-server +++ b/debian/aide.conf.d/31_aide_amanda-server @@ -66,7 +66,7 @@ for configfile in $(find /etc/amanda -name amanda.conf ! -path '/etc/amanda/temp printf "@@define AMANDA_INDEXDIR %s\\n" "${AMANDA_INDEXDIR}" if [ -f "disklist" ]; then while read -r host dev rest; do -if echo "${host}" | grep -q '^\\(#.*\\)\\?$'; then continue; fi +if echo "${host}" | grep -Eq '^(#.*)?$'; then continue; fi dev="$(echo "${dev}" | sed 's|[/:]|_|g;s|\\"||g')" if ! skip_multiline_dle; then printf "!/@@{AMANDA_INDEXDIR}/%s/%s/@@{YEAR4D}[0-9]{4}_[0123]\\.gz$ f\\n" "${host}" "${dev}" Best regards Hannes
Bug#1011957: aideinit fails in amanda-server processing
Applied the patch and added some blank lines back to the disklist. Still doesn't work. amalthea:~# patch /etc/aide/aide.conf.d/31_aide_amanda-server -i aide.patch patching file /etc/aide/aide.conf.d/31_aide_amanda-server Hunk #1 succeeded at 66 with fuzz 2. amalthea:~# cd /etc/amanda/Trent/ amalthea:/etc/amanda/Trent# nano disklist amalthea:/etc/amanda/Trent# aideinit Overwrite existing /var/lib/aide/aide.db.new [Yn]? Running aide --init... ERROR: /etc/aide/aide.conf.d/31_aide_amanda-server (stdout):13:28: error in rule '/var/lib/amanda/Trent/index///2022[0-9]{4}_[0123]\.gz$': invalid double slash (line: '!/@@{AMANDA_INDEXDIR}///@@{YEAR4D}[0-9]{4}_[0123]\.gz$ f') AIDE --init return code 17 On 5/28/2022 2:10 PM, Hannes von Haugwitz wrote: Hello Barry, On Sat, May 28, 2022 at 11:34:44AM -0500, Barry Trent wrote: Yes! Removing all blank (and "#" comment) lines from disklist solved the problem on 3 different machines. So you've found the issue but, of course, blanks and comments are valid in the disklist and are even present in the disklist installed as a sample with amanda-server in DailySet1. I had to remove the DailySet1 which was still present on one machine to get aideinit to complete without the error. Can you please apply the following patch and report back if it solves your issue? diff --git a/debian/aide.conf.d/31_aide_amanda-server b/debian/aide.conf.d/31_aide_amanda-server index 5750779..78424eb 100755 --- a/debian/aide.conf.d/31_aide_amanda-server +++ b/debian/aide.conf.d/31_aide_amanda-server @@ -66,7 +66,7 @@ for configfile in $(find /etc/amanda -name amanda.conf ! -path '/etc/amanda/temp printf "@@define AMANDA_INDEXDIR %s\\n" "${AMANDA_INDEXDIR}" if [ -f "disklist" ]; then while read -r host dev rest; do -if echo "${host}" | grep -q '^\\(#.*\\)\\?$'; then continue; fi +if echo "${host}" | grep -q '^(#.*)?$'; then continue; fi dev="$(echo "${dev}" | sed 's|[/:]|_|g;s|\\"||g')" if ! skip_multiline_dle; then printf "!/@@{AMANDA_INDEXDIR}/%s/%s/@@{YEAR4D}[0-9]{4}_[0123]\\.gz$ f\\n" "${host}" "${dev}" Best regards Hannes -- Barry A. Trent 952-829-5864, x109 barry.tr...@atcorp.com smime.p7s Description: S/MIME Cryptographic Signature
Bug#1011957: aideinit fails in amanda-server processing
Hello Barry, On Sat, May 28, 2022 at 11:34:44AM -0500, Barry Trent wrote: > Yes! Removing all blank (and "#" comment) lines from disklist solved the > problem on 3 different machines. > > So you've found the issue but, of course, blanks and comments are valid in > the disklist and are even present in the disklist installed as a sample with > amanda-server in DailySet1. I had to remove the DailySet1 which was still > present on one machine to get aideinit to complete without the error. Can you please apply the following patch and report back if it solves your issue? diff --git a/debian/aide.conf.d/31_aide_amanda-server b/debian/aide.conf.d/31_aide_amanda-server index 5750779..78424eb 100755 --- a/debian/aide.conf.d/31_aide_amanda-server +++ b/debian/aide.conf.d/31_aide_amanda-server @@ -66,7 +66,7 @@ for configfile in $(find /etc/amanda -name amanda.conf ! -path '/etc/amanda/temp printf "@@define AMANDA_INDEXDIR %s\\n" "${AMANDA_INDEXDIR}" if [ -f "disklist" ]; then while read -r host dev rest; do -if echo "${host}" | grep -q '^\\(#.*\\)\\?$'; then continue; fi +if echo "${host}" | grep -q '^(#.*)?$'; then continue; fi dev="$(echo "${dev}" | sed 's|[/:]|_|g;s|\\"||g')" if ! skip_multiline_dle; then printf "!/@@{AMANDA_INDEXDIR}/%s/%s/@@{YEAR4D}[0-9]{4}_[0123]\\.gz$ f\\n" "${host}" "${dev}" Best regards Hannes
Bug#1011957: aideinit fails in amanda-server processing
Yes! Removing all blank (and "#" comment) lines from disklist solved the problem on 3 different machines. So you've found the issue but, of course, blanks and comments are valid in the disklist and are even present in the disklist installed as a sample with amanda-server in DailySet1. I had to remove the DailySet1 which was still present on one machine to get aideinit to complete without the error. On 5/28/2022 9:46 AM, Hannes von Haugwitz wrote: Hi Barry, On Fri, May 27, 2022 at 04:29:54PM -0500, Barry Trent wrote: *** disklist zmoby.atcorp.com/ comp-root-tar symposium.atcorp.com/ comp-root-tar symposium.atcorp.com/bbbcomp-root-tar moby.atcorp.com / comp-root-tar coelacanth.atcorp.com / comp-root-tar sawfish.atcorp.com / comp-root-tar sawfish.atcorp.com /varcomp-root-tar Is there an empty line in the disklist file? If so, can you please remove this line and try again? Best regards Hannes -- Barry A. Trent 952-829-5864, x109 barry.tr...@atcorp.com smime.p7s Description: S/MIME Cryptographic Signature
Bug#1011957: aideinit fails in amanda-server processing
Hi Barry, On Fri, May 27, 2022 at 04:29:54PM -0500, Barry Trent wrote: > *** disklist > zmoby.atcorp.com / comp-root-tar > > symposium.atcorp.com / comp-root-tar > symposium.atcorp.com /bbbcomp-root-tar > moby.atcorp.com / comp-root-tar > coelacanth.atcorp.com / comp-root-tar > sawfish.atcorp.com / comp-root-tar > sawfish.atcorp.com /varcomp-root-tar Is there an empty line in the disklist file? If so, can you please remove this line and try again? Best regards Hannes
Bug#1011957: aideinit fails in amanda-server processing
Package: aide Version: 0.17.3-4+deb11u1 Severity: important X-Debbugs-Cc: barry.tr...@atcorp.com Dear Maintainer, I upgraded two hosts which function as amanda backup servers from buster to bullseye and ran into issues running aideinit. It failed: root@archive:~# aideinit Overwrite existing /var/lib/aide/aide.db.new [Yn]? Running aide --init... ERROR: /etc/aide/aide.conf.d/31_aide_amanda-server (stdout):15:25: error in rule '/etc/amanda/atc-hq/index///2022[0-9]{4}_[0123]\.gz$': invalid double slash (line: '!/@@{AMANDA_INDEXDIR}///@@{YEAR4D}[0-9]{4}_[0123]\.gz$ f') AIDE --init return code 17 I worked around the problem by commenting out a small section of 31_aide_amanda-server starting at line 65: AMANDA_INDEXDIR="$(amgetconf "${CONF}" indexdir)" AMANDA_INDEXDIR="${AMANDA_INDEXDIR#/}" # # Commented out by bat May 2022 at bullseye upgrade to # prevent errors # # if [ -n "${AMANDA_INDEXDIR}" ]; then #printf "@@define AMANDA_INDEXDIR %s\\n" "${AMANDA_INDEXDIR}" #if [ -f "disklist" ]; then # while read -r host dev rest; do #if echo "${host}" | grep -q '^\\(#.*\\)\\?$'; then continue; fi #dev="$(echo "${dev}" | sed 's|[/:]|_|g;s|\\"||g')" # if ! skip_multiline_dle; then #printf "!/@@{AMANDA_INDEXDIR}/%s/%s/@@{YEAR4D}[0-9]{4}_[0123]\\.gz$ f\\n" "${host}" "${dev}" #printf "/@@{AMANDA_INDEXDIR}/%s/%s$ d VarDir\\n" "${host}" "${dev}" # fi # done < disklist # MULTILINEDLE=0 #fi # fi AMANDA_CHANGERFILE="$(amgetconf "${CONF}" changerfile)" AMANDA_CHANGERDIR="${AMANDA_CHANGERFILE%changer}" I've included my amanda.conf and disklist from one of the machines in this bug report: *** disklist zmoby.atcorp.com/ comp-root-tar symposium.atcorp.com/ comp-root-tar symposium.atcorp.com/bbbcomp-root-tar moby.atcorp.com / comp-root-tar coelacanth.atcorp.com / comp-root-tar sawfish.atcorp.com / comp-root-tar sawfish.atcorp.com /varcomp-root-tar *** amanda.conf # amanda.conf - sample Amanda configuration file. See amanda.conf(5) for # details org "ATC-HQ" # your organization name for reports mailto "root" # space separated list of operators at your site mailer "/usr/bin/mail" dumpuser "backup" # the user to run dumps under inparallel 4# maximum dumpers that will run in parallel dumporder "sssS"# specify the priority order of each dumper # s -> smallest size # S -> biggest size # t -> smallest time # T -> biggest time # b -> smallest bandwitdh # B -> biggest bandwitdh # try "BTBTBTBTBTBT" if you are not holding # disk constrained taperalgo first # The algorithm used to choose which dump image to send # to the taper. # Possible values: # [first|firstfit|largest|largestfit|smallest|last] # Default: first. # first First in - first out. # firstfit The first dump image that will fit # on the current tape. # largest The largest dump image. # largestfitThe largest dump image that will fit # on the current tape. # smallest The smallest dump image. # last Last in - first out. displayunit "k" # Possible values: "k|m|g|t" # Default: k. # The unit used to print many numbers. # k=kilo, m=mega, g=giga, t=tera netusage 8000 Kbps # maximum net bandwidth for Amanda, in KB per sec dumpcycle 1 weeks # the number of days in the normal dump cycle runspercycle 5 # the number of amdump runs in dumpcycle days # (4 weeks * 5 amdump runs per week -- just weekdays) tapecycle 80 tapes # the number of tapes in rotation # 4 weeks (dumpcycle) times 5 tapes per week (just # the weekdays) plus a few to handle errors that # need amflush and so we do not overwrite the full # backups performed at the beginning of the previous # cycle bumpsize 20 Mb # minimum savings (threshold) to bump level 1 -> 2 bumppercent 20 # minimum savings (threshold) to bump level 1 -> 2 bumpdays 1 # minimum days at each level bumpmult 4 # threshold =