Page 1 of 1
Error while backup Nagios XI
Posted: Tue Jul 21, 2015 4:39 pm
by tbyrne
System: VM of CentOS 6.5 with Nagios XI 2014R2.7 running VMware esxi 6
When I run the backup_xi.sh script as root I receive this error message
"mysqldump: Got error: 130: Incorrect file format 'nagios_commenthistory' when using LOCK TABLES
Error backing up MySQL database 'nagios' - check the password in this script!"
I found this post "by reinaldo.gomes ยป Thu Sep 11, 2014 4:21 pm "
I tried the repair command suggested in the post
"repair table nagios_comments use_frm \g"
But when I tried running the backup_xi.sh script it failed at the same spot.
I tried running repair_database.sh but this also failed to fix the problem.
Any other suggestions?
Re: Error while backup Nagios XI
Posted: Tue Jul 21, 2015 5:12 pm
by jolson
Get your XI configuration status:
Code: Select all
php /usr/local/nagiosxi/scripts/import_xiconfig.php > ~/config.dat
Read the file:
Using the password from the
cfg__db_info__ndoutils__pwd field, let's try accessing the nagios mysql database:
Code: Select all
mysql -u ndoutils --password="XXXXXXX" nagios
Replace "XXXXXXX" with the password specified in the field mentioned above. Do you get an access denied message or does the command log you into mysql properly?
Re: Error while backup Nagios XI
Posted: Wed Jul 22, 2015 8:49 am
by tbyrne
jolson,
Using the password from the cfg__db_info__ndoutils__pwd field I was able to log in to the MYSQL database and show all of the tables, I also performed some query's to just be sure. No problems.
Re: Error while backup Nagios XI
Posted: Wed Jul 22, 2015 9:12 am
by jolson
Try issuing the following command:
Code: Select all
echo 'desc nagios_commenthistory' | mysql -uroot -pnagiosxi nagios
If the above doesn't run properly, try running a 'desc nagios_commenthistory' when you're inside of the 'nagios' database. Do your results match mine?
Field Type Null Key Default Extra
commenthistory_id int(11) NO PRI NULL auto_increment
instance_id smallint(6) NO MUL 0
entry_time datetime NO 0000-00-00 00:00:00
entry_time_usec int(11) NO 0
comment_type smallint(6) NO 0
entry_type smallint(6) NO 0
object_id int(11) NO 0
comment_time datetime NO 0000-00-00 00:00:00
internal_comment_id int(11) NO 0
author_name varchar(64) NO
comment_data varchar(255) NO
is_persistent smallint(6) NO 0
comment_source smallint(6) NO 0
expires smallint(6) NO 0
expiration_time datetime NO 0000-00-00 00:00:00
deletion_time datetime NO 0000-00-00 00:00:00
deletion_time_usec int(11) NO 0
Re: Error while backup Nagios XI
Posted: Thu Jul 23, 2015 11:16 am
by tbyrne
Jolson,
That was the problem, my server was missing 'nagios_commenthistory'.
I tried running 'repairmysql.sh nagios nagios_commenthistory' The command showed that the table was missing, I was hoping it would recreate the table but it did not.
I was able to export the table from a lab system and import in to the non-working system. I was then able to run the backup_xi.sh script with our errors.
Would the cause any issues with the nagios xi system if I were to import the backup in to another system?
Thanks for the help.
Re: Error while backup Nagios XI
Posted: Thu Jul 23, 2015 11:46 am
by jolson
Would the cause any issues with the nagios xi system if I were to import the backup in to another system?
As long as the backup completed properly and Nagios XI isn't reporting any issues, I don't see a problem with importing the backup into another system.
Glad I could help! May I close this thread?
Re: Error while backup Nagios XI
Posted: Thu Jul 23, 2015 12:11 pm
by tbyrne
Jolson,
My system is working fine and the backup completed with our errors.
Thanks for all of the help.
You can close this thread