Help with data migration, please

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:

  1. 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.
  2. 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.
  3. 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.

Thank you in advance, and all the best.

  1. did you try to restore to the DB in the Docker or a external fresh one?
  2. bucket? Director baskets?
  3. which JSON files?

There is the possibility to use the old Icinga as a import source in the director.

Hi Dominik,

  1. The DB were restored to the container running MYSQL within Docker, fresh installation.
  2. Baskets, not buckets or course.
  3. I’ve exported Hosts from the original server to an external file in JSON format.

Thank you very much for your time

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 Sir,

no I have not.
The new docker deployment uses Icinga2 version 2.11.4, so just to confirm, the source file for schema import is this one, correct?


Thank you in advance

You need to apply all schema migration scripts that have come out after the version you have update from until the version you update to.

Are you really using such old icinga2 version? Or are those the versions of IcingaWeb2?

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.

Thank you for the detailed answer, sir.

So just to sum it up, just to make sure I follow you, here are your proposed steps:

  1. A fresh installation.
  2. mysqldump on the older server, import to the new one
  3. 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.