Need to restore from backup
Posted: Wed Mar 26, 2014 11:46 am
Something has gone wrong with our Nagios server and it is not able to connect to MySQL and the web UI (ournagiosserver.com/nagiosxi/) just shows a blank page. This happened sometime just after it was upgraded on the 19th.
Messages log:
Linux version is 2.6.32-431.1.2.0.1.el6.x86_64. Not sure exact version of Nagios but it was just updated recently to the latest version.
Backups were made prior to upgrade using the following commands:
How would I:
1. Figure out if MySQL is completely hosed and needs to be reinstalled?
2. If MySQL OK, how do I restore the backups?
Would it be easier to do a fresh install then restore the backups?
Messages log:
Code: Select all
Mar 25 11:25:20 localhost nagios: ndomod: Successfully reconnected to data sink! 0 items lost, 31 queued items to flush.
Mar 25 11:25:20 localhost nagios: ndomod: Successfully flushed 31 queued items to data sink.
Mar 25 11:25:20 localhost ndo2db: Error: Could not connect to MySQL database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
Mar 25 11:25:20 localhost ndo2db: Error: Could not connect to MySQL database: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)
Mar 25 11:25:20 localhost nagios: ndomod: Error writing to data sink! Some output may get lost...
Mar 25 11:25:20 localhost nagios: ndomod: Please check remote ndo2db log, database connection or SSL ParametersBackups were made prior to upgrade using the following commands:
Code: Select all
tar cjf /root/pre-upgrade-backup/usr-local-nagios.tar.bz2 /usr/local/nagios
tar cjf /root/pre-upgrade-backup/usr-local-nagiosxi.tar.bz2 /usr/local/nagiosxi
pg_dump -U nagiosxi -c -F p nagiosxi | bzip2 -c > /root/pre-upgrade-backup/pg_nagiosxi.sql.bz2
mysqldump -u root -pnagiosxi nagios | bzip2 -c > /root/pre-upgrade-backup/my_nagios.sql.bz2
mysqldump -u root -pnagiosxi nagiosql | bzip2 -c > /root/pre-upgrade-backup/my_nagiosql.sql.bz21. Figure out if MySQL is completely hosed and needs to be reinstalled?
2. If MySQL OK, how do I restore the backups?
Would it be easier to do a fresh install then restore the backups?