Hello,
I see the scheduled backup is getting failed very frequently with the below message.
------------
The scheduled local backup at 2023-08-14 05:55:03 failed.
Last output from the system:
View your full scheduled backup logs at /usr/local/nagiosxi/var/components/scheduledbackups.log to find out more details about the error. Your backup may have timed out, you can set a backup_timeout variable in config.inc.php to increase it.
------------
Logs for reference.
# cat /usr/local/nagiosxi/var/components/scheduledbackups.log
No entry for terminal type "unknown";
using dumb terminal settings.
\nStarting new backup....\n
Backing up Nagios Core...
tar: Removing leading `/' from member names
tar: /usr/local/nagios/var/rw/nagios.qh: socket ignored
tar: /usr/local/nagios/var: file changed as we read it
Backing up Nagios XI...
tar: Removing leading `/' from member names
tar: /usr/local/nagiosxi/var/sysstat.log: file changed as we read it
tar: /usr/local/nagiosxi/var/eventman.log: file changed as we read it
tar: /usr/local/nagiosxi/var: file changed as we read it
Backing up MRTG...
tar: Removing leading `/' from member names
Backing up the SNMP directories
tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
Backing up NRDP...
tar: Removing leading `/' from member names
Backing up Nagvis...
tar: Removing leading `/' from member names
Backing up nagios user home dir...
tar: Removing leading `/' from member names
Backing up MySQL databases...
mysqldump: Got error: 144: "Table './nagios/nagios_statehistory' is marked as crashed and last (automatic?) repair failed" when using LOCK TABLES
Error backing up MySQL database 'nagios' - check the password in this script!
--------------
-The previous post (from 2014) related to mysql password issues did not help me, can you let me know how to fix this issue?
-The MySQL database password hardcoded anywhere?
Thanks,
Scheduled Local Backup Failed
Re: Scheduled Local Backup Failed
Hi @bseuser, thanks for reaching out.
Try the following...
Log into the terminal as root and run the following command:
If you are still having issues, try the following command.
If the issue persists, please send us your system profile (if you can access through the XI interface).
To send us your system profile.
Login to the Nagios XI GUI using a web browser
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share this in a private message and then reply to this post to bring it up in the queue.
Try the following...
Log into the terminal as root and run the following command:
Code: Select all
/usr/local/nagiosxi/scripts/repair_databases.sh
Code: Select all
mysqlcheck -r -f -uroot -pnagiosxi --all-databases --use_frmTo send us your system profile.
Login to the Nagios XI GUI using a web browser
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share this in a private message and then reply to this post to bring it up in the queue.
Please let us know if you have any other questions or concerns.
-Laura
-Laura
Re: Scheduled Local Backup Failed
Hello bseuser,
From your log, it seems that your database (or at least one of your tables) is corrupted.
https://assets.nagios.com/downloads/nag ... tabase.pdf
This may be the actual cause of your failed backup and not the password as the log hint suggested.
-Blake Bahner
From your log, it seems that your database (or at least one of your tables) is corrupted.
This indicates that the table/database may be corrupted. You can try repairing the database:mysqldump: Got error: 144: "Table './nagios/nagios_statehistory' is marked as crashed and last (automatic?) repair failed" when using LOCK TABLES
https://assets.nagios.com/downloads/nag ... tabase.pdf
This may be the actual cause of your failed backup and not the password as the log hint suggested.
-Blake Bahner
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
Re: Scheduled Local Backup Failed
Hi,@lgute I tried repairing the DB with the commands you mentioned. Still i am facing the same issue sent you the system profile in a private message.
Re: Scheduled Local Backup Failed
Hi @lgute
This issue still persists i shared the system profile with you in a private message. Can you review and suggest the next steps?
Thanks,
This issue still persists i shared the system profile with you in a private message. Can you review and suggest the next steps?
Thanks,