Page 1 of 1

Error running backup of Nagios

Posted: Wed Aug 07, 2013 8:48 pm
by bbraunsc
Hello,

Whenever I run a back using the command line scrip backup_xi.sh I get the following error. Does anyone know how to fix it?
I'm trying to get a good backup so I can migrate our installation to new hardware.

[root@GBPMSPNAG001 scripts]# ./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: file changed as we read it
Backing up Nagios XI...
tar: Removing leading `/' from member names
Backing up MySQL databases...
mysqldump: Got error: 145: Table './nagiosql/tbl_logbook' is marked as crashed and should be repaired when using LOCK TABLES
Error backing up MySQL database 'nagiosql' - check the password in this script!


I also tried to run a repair of the table and MySQL said the table does not exist.

[root@GBPMSPNAG001 scripts]# ./repairmysql.sh nagios tbl_logbook
DATABASE: nagios
TABLE: tbl_logbook
/var/lib/mysql/nagios /usr/local/nagiosxi/scripts
Stopping mysqld: [ OK ]
myisamchk: error: File 'tbl_logbook' doesn't exist
Starting mysqld: [ OK ]
/usr/local/nagiosxi/scripts

===============
REPAIR COMPLETE
===============


Thanks
Bane

Re: Error running backup of Nagios

Posted: Wed Aug 07, 2013 9:40 pm
by scottwilkerson
This table is in the nagiosql db

run

Code: Select all

./repairmysql.sh nagiosql