I have a server running xi 5.5.7
I am testing the postgreql to mysql migration by following these steps as defined in the kb article:
Code: Select all
cd /tmp
wget https://github.com/ChrisLundquist/pg2mysql/archive/master.zip
unzip master.zip
cd /tmp/pg2mysql-master/
pg_dump --no-acl --no-owner --format p --data-only -U nagiosxi nagiosxi > nagiosxi.psql
php pg2mysql_cli.php nagiosxi.psql nagiosxi.mysql myisam
wget https://assets.nagios.com/downloads/nagiosxi/scripts/nagiosxi_create_db.sql
mysql -uroot -pnagiosxi < nagiosxi_create_db.sql
perl -l -n -i -e 'print $_; print "max_allowed_packet=512M" if(/\[mysqld\]/);' /etc/my.cnf
service mysqld restart || systemctl restart mariadb
mysql -uroot -pnagiosxi nagiosxi --max_allowed_packet=512M --force < nagiosxi.mysql
mysql -u root -pnagiosxi -e "CREATE USER 'nagiosxi'@'localhost' IDENTIFIED BY 'n@gweb';"
mysql -u root -pnagiosxi -e "GRANT ALL ON nagiosxi.* TO 'nagiosxi'@'localhost'; FLUSH PRIVILEGES;"
cp -p /usr/local/nagiosxi/html/config.inc.php /usr/local/nagiosxi/html/config.inc.php.backup
sed -i 's/pgsql/mysql/' /usr/local/nagiosxi/html/config.inc.php
mv /usr/local/nagiosxi/html/includes/components/nagiosim ~/nagiosim.backup &>/dev/null
service postgresql stop || systemctl stop postgresql
chkconfig postgresql off || systemctl disable postgresqlHowever prior to the migration my actions component
Code: Select all
/administrator/systemextentions/manage components/ACTIONSAfter the migration : Also, an issue that I had , which got resolved in this post:
Code: Select all
https://support.nagios.com/forum/viewtopic.php?f=16&t=51587In order to test my theory I ran these commands to reverse the postgresql migration:
Code: Select all
service postgresql start
sudo cp -p /usr/local/nagiosxi/html/config.inc.php /usr/local/nagiosxi/html/config.inc.php.attempted
sudo cp -p /usr/local/nagiosxi/html/config.inc.php.backup /usr/local/nagiosxi/html/config.inc.php
I also had to reapply the fix for the wproc issue after reversing the migration .
So I have come to the conclusion that migrating from postgreql to mysql is what caused me to lose the info in the actions component.