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.
Nagios Full Backup failed to completed
Re: Nagios Full Backup failed to completed
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.
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
mysqlcheck -f -r -u root -pnagiosxi --all-databases --use-frmCode: 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.txtBe sure to check out our Knowledgebase for helpful articles and solutions!