BACKUP - Clarification

Hi Guys!
I need some clarification regarding the BACKUP strategy for an ICINGA2 environment.
My ICINGA2 is made of a central Master Server.
I have also Director - Icingaweb and of course all the DB (MySQL). I have also and Grafana and INFLUXDB on the same server.
But now I want to set up a consistent backup only of ICINGA2.

Reading the documentation on line
We need to Ensure to include the following in your backups:

  • Configuration files in /etc/icinga2
  • Certificate files in /var/lib/icinga2/ca (Master CA key pair) and /var/lib/icinga2/certs (node certificates)
  • Runtime files in /var/lib/icinga2
  • Optional: IDO database backup

And of course ALL DB , that is:

  • icinga
  • icinga2
  • icingaweb
  • director
  • reporting
    (some other DB is missing?)

Is this enough for a consistent backup?
How can I perform also the IDO database Backup?
And the /var/lib/icinga2 folder should be complete or only some folders?

I rsync the entire /var/lib/icinga2 folder to another location just to keep it simple. As far as backing up the IDO database, since you’re using reporting I’m going to assume you’re using mysql or mariadb rather than postgres. You can review the mysqldump tool’s documentation here:

Yes, I’m using mysqldump for backup the DB (MySQL) - But I want to be sure of what are the name of DB to backup.
I see these 4 DB. THis is enought, I mean ?

That is likely everything Icinga is using in your case, but if you login to the database and type show databases you should get a list of everything in that instance. As well, if you click on the resource in Icingaweb, you should see all the database connection details.

I’m using a script posted on the netways blog some time ago (without the encryption though ;D)

I also added the plugins folder (e.g. /usr/lib/nagios/plugins) to backup scripts I edited/added.

Backup dir is a mounted share on a different host/storage.

The problem with this question is that you can choose the names of the databases yourself. We can’t tell if you named them icinga or myawesomemonitoringdatabase. So you will have to backup all the databases, that are used by your Icinga setup. You could take all that are listed in files within /etc/icinga2/features-enabled and all that are listed within /etc/icingaweb2/resources.ini. That might be enough but you know your setup better than we do.

1 Like