Page 1 of 1

Failed Nagios Backup

Posted: Thu Sep 03, 2015 2:45 pm
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.

Re: Failed Nagios Backup

Posted: Thu Sep 03, 2015 3:15 pm
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.

Re: Failed Nagios Backup

Posted: Fri Sep 04, 2015 7:26 am
by peter.zanetti
This solved the issue, Thanks!

Re: Failed Nagios Backup

Posted: Fri Sep 04, 2015 9:03 am
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!