2015-02-12 13:16:30 +01:00
|
|
|
# <a id="upgrading-icinga-2"></a> Upgrading Icinga 2
|
2015-01-23 14:15:57 +01:00
|
|
|
|
|
|
|
Upgrading Icinga 2 is usually quite straightforward. Ordinarily the only manual steps involved
|
|
|
|
are scheme updates for the IDO database.
|
|
|
|
|
|
|
|
## <a id="upgrading-mysql-db"></a> Upgrading the MySQL database
|
|
|
|
|
2016-05-23 14:14:59 +02:00
|
|
|
If you're upgrading an existing Icinga 2 instance, you should check the
|
2015-01-23 14:15:57 +01:00
|
|
|
`/usr/share/icinga2-ido-mysql/schema/upgrade` directory for an incremental schema upgrade file.
|
|
|
|
|
|
|
|
> **Note**
|
|
|
|
>
|
2016-05-23 14:14:59 +02:00
|
|
|
> If there isn't an upgrade file for your current version available, there's nothing to do.
|
2015-01-23 14:15:57 +01:00
|
|
|
|
2015-11-20 15:57:16 +01:00
|
|
|
Apply all database schema upgrade files incrementally.
|
2015-01-23 14:15:57 +01:00
|
|
|
|
|
|
|
# mysql -u root -p icinga < /usr/share/icinga2-ido-mysql/schema/upgrade/<version>.sql
|
|
|
|
|
|
|
|
The Icinga 2 DB IDO module will check for the required database schema version on startup
|
|
|
|
and generate an error message if not satisfied.
|
|
|
|
|
|
|
|
|
2015-02-12 13:16:30 +01:00
|
|
|
**Example:** You are upgrading Icinga 2 from version `2.0.2` to `2.3.0`. Look into
|
2015-01-23 14:15:57 +01:00
|
|
|
the *upgrade* directory:
|
|
|
|
|
|
|
|
$ ls /usr/share/icinga2-ido-mysql/schema/upgrade/
|
2015-02-12 13:16:30 +01:00
|
|
|
2.0.2.sql 2.1.0.sql 2.2.0.sql 2.3.0.sql
|
2015-01-23 14:15:57 +01:00
|
|
|
|
2015-02-12 13:16:30 +01:00
|
|
|
There are two new upgrade files called `2.1.0.sql`, `2.2.0.sql` and `2.3.0.sql`
|
2015-11-20 15:57:16 +01:00
|
|
|
which must be applied incrementally to your IDO database.
|
2015-01-23 14:15:57 +01:00
|
|
|
|
|
|
|
## <a id="upgrading-postgresql-db"></a> Upgrading the PostgreSQL database
|
|
|
|
|
2016-05-23 14:14:59 +02:00
|
|
|
If you're updating an existing Icinga 2 instance, you should check the
|
2015-01-23 14:15:57 +01:00
|
|
|
`/usr/share/icinga2-ido-pgsql/schema/upgrade` directory for an incremental schema upgrade file.
|
|
|
|
|
|
|
|
> **Note**
|
|
|
|
>
|
2016-05-23 14:14:59 +02:00
|
|
|
> If there isn't an upgrade file for your current version available, there's nothing to do.
|
2015-01-23 14:15:57 +01:00
|
|
|
|
2015-11-20 15:57:16 +01:00
|
|
|
Apply all database schema upgrade files incrementally.
|
2015-01-23 14:15:57 +01:00
|
|
|
|
|
|
|
# export PGPASSWORD=icinga
|
|
|
|
# psql -U icinga -d icinga < /usr/share/icinga2-ido-pgsql/schema/upgrade/<version>.sql
|
|
|
|
|
|
|
|
The Icinga 2 DB IDO module will check for the required database schema version on startup
|
|
|
|
and generate an error message if not satisfied.
|
|
|
|
|
2015-02-12 13:16:30 +01:00
|
|
|
**Example:** You are upgrading Icinga 2 from version `2.0.2` to `2.3.0`. Look into
|
2015-01-23 14:15:57 +01:00
|
|
|
the *upgrade* directory:
|
|
|
|
|
|
|
|
$ ls /usr/share/icinga2-ido-pgsql/schema/upgrade/
|
2015-02-12 13:16:30 +01:00
|
|
|
2.0.2.sql 2.1.0.sql 2.2.0.sql 2.3.0.sql
|
2015-01-23 14:15:57 +01:00
|
|
|
|
2015-02-12 13:16:30 +01:00
|
|
|
There are two new upgrade files called `2.1.0.sql`, `2.2.0.sql` and `2.3.0.sql`
|
2015-11-20 15:57:16 +01:00
|
|
|
which must be applied incrementally to your IDO database.
|