Director: Database Creation from .conf file

we have a problem with a director database (on mysql) that has been lost / dropped and there aren’t backup available …

we recreate the database schema and correctly connect from icingaweb2, but not see any host/services/etc.

icingaweb2 work correctly with original configuration (host/services/etc.)

if we browse on /icinga2/api/zones/…/director/ we see on file system the right icinga2 configuration file.

question: is there a way to recreate a director database starting from zones configuration file?

agent_endpoints.conf agent_zones.conf
commands.conf endpoints.conf hosts.conf host_templates.conf
services.conf servicesets.conf service_apply.conf service_templates.conf

every help is welcome!
thanks a lot

I guess you could, with a lot of manual work, create json config objects out of each of the icinga2 config objects (hosts, service, templates, commands…) and then import them via the API or CLI or import via Director basket into director.

But my guess would be that this is more work than simply working through the config files and create the stuff inside Director directly (depend on the amount of objects of course).

I’m not aware of any (semi)automatic way of doing this.

Thanks a lot log1c,
I think the best way will be going thru RestApi Import/Sync, but seems to be one Import for each field…