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?
Error while backup Nagios XI
Re: Error while backup Nagios XI
Get your XI configuration status:
Read the file:
Using the password from the cfg__db_info__ndoutils__pwd field, let's try accessing the nagios mysql database:
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?
Code: Select all
php /usr/local/nagiosxi/scripts/import_xiconfig.php > ~/config.datCode: Select all
cat ~/config.datCode: Select all
mysql -u ndoutils --password="XXXXXXX" nagiosRe: Error while backup Nagios XI
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.
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
Try issuing the following command:
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?
Code: Select all
echo 'desc nagios_commenthistory' | mysql -uroot -pnagiosxi nagiosField 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
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.
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
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.Would the cause any issues with the nagios xi system if I were to import the backup in to another system?
Glad I could help! May I close this thread?
Re: Error while backup Nagios XI
Jolson,
My system is working fine and the backup completed with our errors.
Thanks for all of the help.
You can close this thread
My system is working fine and the backup completed with our errors.
Thanks for all of the help.
You can close this thread