I started running Nagios XI during the 2014 release which used both postgres and MySQL. I was hearing there was a method to migrate everything over to MySQL and remove postgres but I cannot find the procedure or scripts in doing so. I am currently running Nagios XI 5.2.5.
Here is what I am seeing but not sure if any of this is actually still being used.
cd /tmp
mysqldump -d -uroot -pnagiosxi --add-drop-table nagiosxi > nagiosxiorig.sql
mysql -pnagiosxi nagiosxi < nagiosxiorig.sql && mysql -pnagiosxi nagiosxi < /tmp/nagiosxinew.sql
Important: This worked for me, that there is no guarantee that it will work for you. I have a very small test VM. This is just an initial attempt to start working on the pg2mysql conversion. It is not an official solution. Our developers haven't even looked at it yet. So, if you decide to use this - use it at your own risk. Try it in a test environment. Don't use it in production!
Be sure to check out our Knowledgebase for helpful articles and solutions!
So, aside from unsupported conversion, is there a way to migrate from pre-Nagios 5 installs that have been upgraded to Nagios 5+ to an install that was done with current Nagios 5+? We have a customer that wants to do this, but I'd rather not re-invent the wheel if we don't have to.
Eric, I believe that should work just fine now. The script handles pgsql, it didn't in older XI5 releases, but it should take care of everything now. I would lab it first, I can do it tomorrow if I don't run out of time.
@h, Pre-New Years, we had a 2014 system upgraded to 5 that we did a backup of, and tried to restore to a new 5 system. Did not go well. Is this the procedure you're referring to, or are you saying we need to manually update databases as @l has done?
As of XI 5.2.4, the restore script was fixed so that it would correctly detect that the restore is coming from an XI system that uses postrgres and makes sure that postgres is properly initiated and then continues to restore the old backup into postgres.
I would upgrade to at least 5.2.4 on the old system first before attempting to restore it to a fresh XI 5.x server.
XI 5.2.4 was not released until February.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.