Page 1 of 1

Solved : Upgrade error

Posted: Tue Apr 08, 2025 2:07 am
by cedric974
"Hi everyone,

I'm hoping someone can offer some guidance – I'm running Nagios version 2024R1.3.3 and it's telling me that the update to 2024R1.4.1 is available. When I try to install the update, I'm encountering some error messages during the backup process.

---- Starting Nagios XI Backup ----
\nStarting new backup....\n
Backing up Nagios Core...
tar: Suppression de « / » au début des noms des membres
tar: /usr/local/nagios/var/rw/nagios.qh : socket ignorée
Backing up Nagios XI...
tar: Suppression de « / » au début des noms des membres
tar: /usr/local/nagiosxi/var/cmdsubsys.log : fichier modifié pendant sa lecture
Backing up MRTG...
tar: Suppression de « / » au début des noms des membres
Backing up the SNMP directories
tar: Suppression de « / » au début des noms des membres
tar: Suppression de « / » au début des noms des membres
Backing up NRDP...
tar: Suppression de « / » au début des noms des membres
Backing up Nagvis...
tar: Suppression de « / » au début des noms des membres
Backing up nagios user home dir...
tar: Suppression de « / » au début des noms des membres
Backing up MySQL databases...
mysqldump: unknown variable 'column-statistics=0'
Error backing up MySQL database 'nagios' - check the password in this script!

I can connect to the database, so I do have the password, but I'm unsure how to provide it to the update script. I'm also having trouble locating the update script itself.

Any help or pointers would be greatly appreciated! Thanks in advance. 😊"

Re: Upgrade error

Posted: Tue Apr 08, 2025 10:33 am
by sgardil
cedric974 wrote: Tue Apr 08, 2025 2:07 am "Hi everyone,

I'm hoping someone can offer some guidance – I'm running Nagios version 2024R1.3.3 and it's telling me that the update to 2024R1.4.1 is available. When I try to install the update, I'm encountering some error messages during the backup process.

---- Starting Nagios XI Backup ----
\nStarting new backup....\n
Backing up Nagios Core...
tar: Suppression de « / » au début des noms des membres
tar: /usr/local/nagios/var/rw/nagios.qh : socket ignorée
Backing up Nagios XI...
tar: Suppression de « / » au début des noms des membres
tar: /usr/local/nagiosxi/var/cmdsubsys.log : fichier modifié pendant sa lecture
Backing up MRTG...
tar: Suppression de « / » au début des noms des membres
Backing up the SNMP directories
tar: Suppression de « / » au début des noms des membres
tar: Suppression de « / » au début des noms des membres
Backing up NRDP...
tar: Suppression de « / » au début des noms des membres
Backing up Nagvis...
tar: Suppression de « / » au début des noms des membres
Backing up nagios user home dir...
tar: Suppression de « / » au début des noms des membres
Backing up MySQL databases...
mysqldump: unknown variable 'column-statistics=0'
Error backing up MySQL database 'nagios' - check the password in this script!

I can connect to the database, so I do have the password, but I'm unsure how to provide it to the update script. I'm also having trouble locating the update script itself.

Any help or pointers would be greatly appreciated! Thanks in advance. 😊"
Hey @cedric974

This issue is being fixed in a newer version but that doesnt really help us here since you are running into issues while trying to update. You can try to use this command in your terminal on the machine to modify the code and it should fix the issue. Like always take a snapshot of the system before hand so you have a useful point to revert to if things go wrong. Let us know if they helps.

Code: Select all

sed -i '/if mysqldump --column-statistics=0 --version/,/fi/ c\
if mysqldump --help 2>/dev/null | grep -q -- '\''--column-statistics'\''; then\n\
    column_option="--column-statistics=0"\n\
else\n\
    column_option=""\n\
fi' /usr/local/nagiosxi/script/backup_xi.sh

Re: Upgrade error

Posted: Wed Apr 09, 2025 5:19 am
by cedric974
Thanks for you answer.

I was able to upgrade to new version ( 2024R1.4.1 ).

I have another error on nagvis, i will open a new post.

Thanks