]> granicus.if.org Git - icinga2/blob - doc/16-upgrading-icinga-2.md
Docs: Add upgrade note for certs path
[icinga2] / doc / 16-upgrading-icinga-2.md
1 # Upgrading Icinga 2 <a id="upgrading-icinga-2"></a>
2
3 Upgrading Icinga 2 is usually quite straightforward. Ordinarily the only manual steps involved
4 are scheme updates for the IDO database.
5
6 ## Upgrading to v2.8 <a id="upgrading-to-2-8"></a>
7
8 The default certificate path was changed from `/etc/icinga2/pki` to
9 `/var/lib/icinga2/certs`.
10
11 This applies to Windows clients in the same way: `%ProgramData%\etc\icinga2\pki`
12 was moved to `%ProgramData%`\var\lib\icinga2\certs`.
13
14 The [setup CLI commands](06-distributed-monitoring.md#distributed-monitoring-setup-master) and the
15 default [ApiListener configuration](06-distributed-monitoring.md#distributed-monitoring-apilistener)
16 have been adjusted to these paths too.
17
18 ## Upgrading the MySQL database <a id="upgrading-mysql-db"></a>
19
20 If you're upgrading an existing Icinga 2 instance, you should check the
21 `/usr/share/icinga2-ido-mysql/schema/upgrade` directory for an incremental schema upgrade file.
22
23 > **Note**
24 >
25 > If there isn't an upgrade file for your current version available, there's nothing to do.
26
27 Apply all database schema upgrade files incrementally.
28
29     # mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/upgrade/<version>.sql
30
31 The Icinga 2 DB IDO module will check for the required database schema version on startup
32 and generate an error message if not satisfied.
33
34
35 **Example:** You are upgrading Icinga 2 from version `2.0.2` to `2.3.0`. Look into
36 the *upgrade* directory:
37
38     $ ls /usr/share/icinga2-ido-mysql/schema/upgrade/
39     2.0.2.sql  2.1.0.sql 2.2.0.sql 2.3.0.sql
40
41 There are two new upgrade files called `2.1.0.sql`, `2.2.0.sql` and `2.3.0.sql`
42 which must be applied incrementally to your IDO database.
43
44 ## Upgrading the PostgreSQL database <a id="upgrading-postgresql-db"></a>
45
46 If you're updating an existing Icinga 2 instance, you should check the
47 `/usr/share/icinga2-ido-pgsql/schema/upgrade` directory for an incremental schema upgrade file.
48
49 > **Note**
50 >
51 > If there isn't an upgrade file for your current version available, there's nothing to do.
52
53 Apply all database schema upgrade files incrementally.
54
55     # export PGPASSWORD=icinga
56     # psql -U icinga -d icinga < /usr/share/icinga2-ido-pgsql/schema/upgrade/<version>.sql
57
58 The Icinga 2 DB IDO module will check for the required database schema version on startup
59 and generate an error message if not satisfied.
60
61 **Example:** You are upgrading Icinga 2 from version `2.0.2` to `2.3.0`. Look into
62 the *upgrade* directory:
63
64     $ ls /usr/share/icinga2-ido-pgsql/schema/upgrade/
65     2.0.2.sql  2.1.0.sql 2.2.0.sql 2.3.0.sql
66
67 There are two new upgrade files called `2.1.0.sql`, `2.2.0.sql` and `2.3.0.sql`
68 which must be applied incrementally to your IDO database.