Failed Nagios Backup

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
peter.zanetti
Posts: 90
Joined: Wed Oct 01, 2014 8:34 am

Failed Nagios Backup

Post by peter.zanetti »

Code: Select all

 ./backup_xi.sh
Backing up Core Config Manager (NagiosQL)...
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
Backing up Nagios Core...
tar: Removing leading `/' from member names
tar: /usr/local/nagios/var/ndo.sock: socket ignored
tar: /usr/local/nagios/var/rw/nagios.qh: socket ignored
tar: /usr/local/nagios/var: file changed as we read it
tar: /usr/local/nagios/share/perfdata/KSKE4617701: file changed as we read it
tar: /usr/local/nagios/share/perfdata/K4505331: file changed as we read it
Backing up Nagios XI...
tar: Removing leading `/' from member names
Backing up MRTG...
tar: Removing leading `/' from member names
Backing up NRDP...
tar: Removing leading `/' from member names
Backing up MySQL databases...
mysqldump: Got error: 144: Table './nagios/nagios_notifications' is marked as crashed and last (automatic?) repair failed when using LOCK TABLES
Error backing up MySQL database 'nagios' - check the password in this script!
I have been trying to take a backup all day and the backup never showed up in the GUI as a local backup. I decided to run the script from the command line to see if I was getting an error. Above is what I got when I ran from the command line.

It says to check the MySQL password in the script but when I look in the script there is no place that defines a MySQL password.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Failed Nagios Backup

Post by ssax »

It's because a table is marked as crashed, run these commands:

Code: Select all

service nagios stop
service ndo2db stop
service mysqld stop
cd /usr/local/nagiosxi/scripts
./repair_databases.sh
This will repair it then start them all back up again, then try your backup.
peter.zanetti
Posts: 90
Joined: Wed Oct 01, 2014 8:34 am

Re: Failed Nagios Backup

Post by peter.zanetti »

This solved the issue, Thanks!
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Failed Nagios Backup

Post by hsmith »

peter.zanetti wrote:This solved the issue, Thanks!
I'm going to lock this one out, let us know if you have anything else come up!
Former Nagios Employee.
me.
Locked