Nagios Full Backup failed to completed

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
joash0809
Posts: 14
Joined: Wed Jul 29, 2020 9:26 am

Nagios Full Backup failed to completed

Post by joash0809 »

Hi Nagios Support Team,

We recently discovered that the daily nagios backup has not been generating the Gzip files in /store/backups/nagiosxi directory. The error message received when we manually ran the backup_xi.sh script.

Backing up MySQL databases...
mysqldump: Got error: 1066: "Not unique table/alias: 'tbl_lnkcontactgrouptocontact'" when using LOCK TABLES
Error backing up MySQL database 'nagiosql' - check the password in this script!

However when we tested to login to the database with the credentials we have, it was successful.

Can you kindly advise what could have possibly caused this issue.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios Full Backup failed to completed

Post by tgriep »

Some of the mysql messages are a bit confusing but it could be caused by a corrupt mysql tables so run the following as root to repair it.

Code: Select all

mysqlcheck -f -r -u root -pnagiosxi --all-databases --use-frm
If you still get the error, Open a root shell on the Nagios server and run the following commands. Get the /tmp/info.txt file and upload it to the post.

Code: Select all

mysql -u root -pnagiosxi -e "show global status like '%used_connections%'; show variables like 'max_connections';" >/tmp/info.txt
echo "SELECT table_schema as 'Database', table_name AS 'Table', round(((data_length + index_length) / 1024 / 1024), 2) 'Size in MB' FROM information_schema.TABLES ORDER BY (data_length + index_length) DESC;" |mysql -t -u root -pnagiosxi >>/tmp/info.txt
echo 'desc tbl_lnkcontactgrouptocontact;' |mysql -t -u root -pnagiosxi  >>/tmp/info.txt
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked