Hello,
Im attempting to copy data from an existing server to a new one.
Old server has Icinga 2.74 installed over an older Centos, while the new one is installed using Docker image built on Debian (Docker).
The environment is very simple, the new server will replace the old one. No zones, multiple servers, etc.
I’ve tried different methods to complete this task:
MySQL dump and restore: this ended up showing different DB migration errors, in part due to existing tables. The restore is made to a clean DB, so no data should be there.
Exporting / Importing data bucket: this went a bit better, however Im stuck with various Daemon errors on the newer server. Host templates related to the master zone are not accepted by the Daemon, however the hosts and services are mostly copied.
Importing data from JSON files: the file is uploaded successfully, however there is no data as a result.
Also, I’ve installed Icinga on a fresh VM as well, however my installation was hindered by various PHP errors after the data was imported.
I would really really appreciate if someone could direct me to a working solution.
I’m not sure if the DB in the Docker is clean or has already data that could explain your problem.
Did you restore to a new schema name or a external DB?
Did you mean the director DB?
I would go with JSON files or any other self build method as a last resort.
Did you run the necessary schema migrations after you imported your “old” database?
Coming from v2.7.x you will need to upgrade the schema to the version icinga2 is running in you docker container: Upgrading the MySQL database
Hello log1c,
the current setup is pretty old, I’ve inherited it at my new workplace, and am tasked with migrating it to the new one. Here it is:
centos 6.8
icinga2 - The Icinga 2 network monitoring daemon (version: 2.12.2-1)
director - 1.80
Icingaweb2 - version 2.74
New one:
Icinga2 version 2.13.7-1 (Based on Docker image)
Web 2.74
Director 1.91
Thank you so much for your time
Is there a method to set the old server as an “import source” and pull the data from there?
Im trying to find relevant info in the documentation, however unfortunately it’s not very clear to me, the only example given there is related to LDAP.
I would simply connect the new installation to the existing database.
Or make a full dump of all the databases and import into your new instance.
quick and dirty example mysqldump -u root --password=whatever --single-transaction --all-databases | gzip > /where/to/save/backup.sql.gz
Coming from v2.12.x you need to import the following changes into the database:
2.12.7.sql
2.13.0.sql
2.13.3.sql
But be aware that this would make the database unusable for the old instance.
You can do the same for the icingaweb2 database and the Icinga Director database as well.
Schema migrations for the Director would be necessary as well and can be executed from the webinterface.
So just to sum it up, just to make sure I follow you, here are your proposed steps:
A fresh installation.
mysqldump on the older server, import to the new one
Gradually upgrading schemas for all three databases (IcingaIDO, Web, Director), since the upgrade to the most recent version at once cannot be done (got it from the documentation).
Is there anything else Im missing?
And once again, thank you so much for taking the time and effort. It’s very much appreciated.