Unable to backup mysql db due to error 144
Posted: Thu Aug 08, 2013 2:31 am
Hello,
Just noticed that our msql backup script (/usr/local/nagiosxi/scripts/backup_xi.sh) hasn't been running for some time. Our last backup is from 13/06. I think that was the day I had to do a mysql restore after the db had crashed because all inodes on the nagios server were used..
After trying to run the script manually, I received a
mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
Error backing up MySQL database 'nagios' - check the password in this script!
So I checked the script and indeed the myslq root password was no longer correct. is it possible the mysql restore also reset the backup script?
After entering the correct password in the script, I tried to run it again. This time I got the follwoing error:
Backing up MySQL databases...
mysqldump: Got error: 144: Table './nagiosql/tbl_logbook' is marked as crashed and last (automatic?) repair failed when using LOCK TABLES
Error backing up MySQL database 'nagiosql' - check the password in this script!
Any advice what to do to get the backup script working again? I found a thread http://support.nagios.com/forum/viewtop ... 81&p=21683 with a similar issue, but I'd rather have someone of XI support have a look at it before I do anything.
As I'm in holiday for a week from tomorrow, it would be nice to have a backup before I left...
Grtz
Just noticed that our msql backup script (/usr/local/nagiosxi/scripts/backup_xi.sh) hasn't been running for some time. Our last backup is from 13/06. I think that was the day I had to do a mysql restore after the db had crashed because all inodes on the nagios server were used..
After trying to run the script manually, I received a
mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: YES) when trying to connect
Error backing up MySQL database 'nagios' - check the password in this script!
So I checked the script and indeed the myslq root password was no longer correct. is it possible the mysql restore also reset the backup script?
After entering the correct password in the script, I tried to run it again. This time I got the follwoing error:
Backing up MySQL databases...
mysqldump: Got error: 144: Table './nagiosql/tbl_logbook' is marked as crashed and last (automatic?) repair failed when using LOCK TABLES
Error backing up MySQL database 'nagiosql' - check the password in this script!
Any advice what to do to get the backup script working again? I found a thread http://support.nagios.com/forum/viewtop ... 81&p=21683 with a similar issue, but I'd rather have someone of XI support have a look at it before I do anything.
As I'm in holiday for a week from tomorrow, it would be nice to have a backup before I left...
Grtz