1 # <a id="upgrading-icinga-2"></a> Upgrading Icinga 2
3 Upgrading Icinga 2 is usually quite straightforward. Ordinarily the only manual steps involved
4 are scheme updates for the IDO database.
6 ## <a id="upgrading-mysql-db"></a> Upgrading the MySQL database
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.
13 > If there isn't an upgrade file for your current version available there's nothing to do.
15 Apply all database schema upgrade files incrementially.
17 # mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/upgrade/<version>.sql
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.
23 **Example:** You are upgrading Icinga 2 from version `2.0.2` to `2.3.0`. Look into
24 the *upgrade* directory:
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
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.
32 ## <a id="upgrading-postgresql-db"></a> Upgrading the PostgreSQL database
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.
39 > If there isn't an upgrade file for your current version available there's nothing to do.
41 Apply all database schema upgrade files incrementially.
43 # export PGPASSWORD=icinga
44 # psql -U icinga -d icinga < /usr/share/icinga2-ido-pgsql/schema/upgrade/<version>.sql
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.
49 **Example:** You are upgrading Icinga 2 from version `2.0.2` to `2.3.0`. Look into
50 the *upgrade* directory:
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
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.