I have been trying to do a backup of nagiosxi using
/usr/local/nagiosxi/scripts/backup_xi.sh
It ends with this error
Backing up MySQL databases...
mysqldump: Got error: 145: Table './nagiosxi/xi_events' is marked as crashed and should be repaired when using LOCK TABLES
Error backing up MySQL database 'nagiosxi' - check the password in this script!
These are ongoing messages in /var/log/mysqld.log
160923 9:51:01 [ERROR] /usr/libexec/mysqld: Table './nagiosxi/xi_events' is marked as crashed and should be repaired
I checked the password as follows...
# mysql -uroot -p<DEFAULT> -e "show variables like 'max_connections';"
+-----------------+-------+
| Variable_name | Value |
+-----------------+-------+
| max_connections | 151 |
+-----------------+-------+
Which is the same password <DEFAULT> in /usr/local/nagiosxi/var/xi-sys.cfg
Please advise...
'xi_events' is marked as crashed and should be repaired
-
- Posts: 36
- Joined: Thu Aug 25, 2016 12:49 pm
Re: 'xi_events' is marked as crashed and should be repaired
Try repairing your tables, and then running through the backup script. it should succeed at this point. I don't think your password is the issue here.
Code: Select all
/usr/local/nagiosxi/scripts/repair_databases.sh
Former Nagios Employee
-
- Posts: 36
- Joined: Thu Aug 25, 2016 12:49 pm
Re: 'xi_events' is marked as crashed and should be repaired
I just ran the repair_databases.sh and it completed with out error..
...
This time the backup_xi.sh completed without error..
Compressing backup...
===============
BACKUP COMPLETE
===============
...
This time the backup_xi.sh completed without error..
Compressing backup...
===============
BACKUP COMPLETE
===============
Re: 'xi_events' is marked as crashed and should be repaired
It seems like your issue has been resolved. Is it OK if we lock this topic?
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 36
- Joined: Thu Aug 25, 2016 12:49 pm
Re: 'xi_events' is marked as crashed and should be repaired
YES you may lock this topic.
Re: 'xi_events' is marked as crashed and should be repaired
/closed.
Feel free to open a new one if you have issues in the future!
Feel free to open a new one if you have issues in the future!
Former Nagios Employee