]> granicus.if.org Git - icinga2/blob - doc/16-upgrading-icinga-2.md
Merge pull request #5593 from Icinga/feature/docs-upgrading
[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 to v2.7 <a id="upgrading-to-2-7"></a>
19
20 v2.7.0 provided new notification scripts and commands. Please ensure to
21 update your configuration accordingly. An advisory has been published [here](https://www.icinga.com/2017/08/23/advisory-for-icinga-2-v2-7-update-and-mail-notification-scripts/).
22
23 In case are having troubles with OpenSSL 1.1.0 and the
24 public CA certificates, please read [this advisory](https://www.icinga.com/2017/08/30/advisory-for-ssl-problems-with-leading-zeros-on-openssl-1-1-0/)
25 and check the [troubleshooting chapter](15-troubleshooting.md#troubleshooting).
26
27 ## Upgrading the MySQL database <a id="upgrading-mysql-db"></a>
28
29 If you're upgrading an existing Icinga 2 instance, you should check the
30 `/usr/share/icinga2-ido-mysql/schema/upgrade` directory for an incremental schema upgrade file.
31
32 > **Note**
33 >
34 > If there isn't an upgrade file for your current version available, there's nothing to do.
35
36 Apply all database schema upgrade files incrementally.
37
38     # mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/upgrade/<version>.sql
39
40 The Icinga 2 DB IDO module will check for the required database schema version on startup
41 and generate an error message if not satisfied.
42
43
44 **Example:** You are upgrading Icinga 2 from version `2.0.2` to `2.3.0`. Look into
45 the *upgrade* directory:
46
47     $ ls /usr/share/icinga2-ido-mysql/schema/upgrade/
48     2.0.2.sql  2.1.0.sql 2.2.0.sql 2.3.0.sql
49
50 There are two new upgrade files called `2.1.0.sql`, `2.2.0.sql` and `2.3.0.sql`
51 which must be applied incrementally to your IDO database.
52
53 ## Upgrading the PostgreSQL database <a id="upgrading-postgresql-db"></a>
54
55 If you're updating an existing Icinga 2 instance, you should check the
56 `/usr/share/icinga2-ido-pgsql/schema/upgrade` directory for an incremental schema upgrade file.
57
58 > **Note**
59 >
60 > If there isn't an upgrade file for your current version available, there's nothing to do.
61
62 Apply all database schema upgrade files incrementally.
63
64     # export PGPASSWORD=icinga
65     # psql -U icinga -d icinga < /usr/share/icinga2-ido-pgsql/schema/upgrade/<version>.sql
66
67 The Icinga 2 DB IDO module will check for the required database schema version on startup
68 and generate an error message if not satisfied.
69
70 **Example:** You are upgrading Icinga 2 from version `2.0.2` to `2.3.0`. Look into
71 the *upgrade* directory:
72
73     $ ls /usr/share/icinga2-ido-pgsql/schema/upgrade/
74     2.0.2.sql  2.1.0.sql 2.2.0.sql 2.3.0.sql
75
76 There are two new upgrade files called `2.1.0.sql`, `2.2.0.sql` and `2.3.0.sql`
77 which must be applied incrementally to your IDO database.