]> granicus.if.org Git - icinga2/blob - doc/17-upgrading-icinga-2.md
Documentation: Reorganize Livestatus and alternative Frontends
[icinga2] / doc / 17-upgrading-icinga-2.md
1 # <a id="upgrading-icinga-2"></a>  Upgrading Icinga 2
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 ## <a id="upgrading-mysql-db"></a> Upgrading the MySQL database
7
8 If you're upgrading an existing Icinga 2 instance you should check the
9 `/usr/share/icinga2-ido-mysql/schema/upgrade` directory for an incremental schema upgrade file.
10
11 > **Note**
12 >
13 > If there isn't an upgrade file for your current version available there's nothing to do.
14
15 Apply all database schema upgrade files incrementially.
16
17     # mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/upgrade/<version>.sql
18
19 The Icinga 2 DB IDO module will check for the required database schema version on startup
20 and generate an error message if not satisfied.
21
22
23 **Example:** You are upgrading Icinga 2 from version `2.0.2` to `2.3.0`. Look into
24 the *upgrade* directory:
25
26     $ ls /usr/share/icinga2-ido-mysql/schema/upgrade/
27     2.0.2.sql  2.1.0.sql 2.2.0.sql 2.3.0.sql
28
29 There are two new upgrade files called `2.1.0.sql`, `2.2.0.sql` and `2.3.0.sql`
30 which must be applied incrementially to your IDO database.
31
32 ## <a id="upgrading-postgresql-db"></a> Upgrading the PostgreSQL database
33
34 If you're updating an existing Icinga 2 instance you should check the
35 `/usr/share/icinga2-ido-pgsql/schema/upgrade` directory for an incremental schema upgrade file.
36
37 > **Note**
38 >
39 > If there isn't an upgrade file for your current version available there's nothing to do.
40
41 Apply all database schema upgrade files incrementially.
42
43     # export PGPASSWORD=icinga
44     # psql -U icinga -d icinga < /usr/share/icinga2-ido-pgsql/schema/upgrade/<version>.sql
45
46 The Icinga 2 DB IDO module will check for the required database schema version on startup
47 and generate an error message if not satisfied.
48
49 **Example:** You are upgrading Icinga 2 from version `2.0.2` to `2.3.0`. Look into
50 the *upgrade* directory:
51
52     $ ls /usr/share/icinga2-ido-pgsql/schema/upgrade/
53     2.0.2.sql  2.1.0.sql 2.2.0.sql 2.3.0.sql
54
55 There are two new upgrade files called `2.1.0.sql`, `2.2.0.sql` and `2.3.0.sql`
56 which must be applied incrementially to your IDO database.