|
1 | 1 | # Upgrading Icinga DB
|
2 | 2 |
|
3 |
| -Specific version upgrades are described below. Please note that version upgrades are incremental. |
4 |
| -If you are upgrading across multiple versions, make sure to follow the steps for each of them. |
| 3 | +Some Icinga DB upgrades require manual intervention, others do not. If you need to intervene, the release notes will |
| 4 | +point you to the specific upgrade section on this page. |
| 5 | + |
| 6 | +Please note that version upgrades are incremental. If you are upgrading across multiple versions, make sure to follow |
| 7 | +the steps for each of them. |
| 8 | + |
| 9 | +## Database Schema Upgrades |
| 10 | + |
| 11 | +Certain Icinga DB version upgrades require a database schema upgrade. If the upgrade section of the specific Icinga DB |
| 12 | +release mentions a schema upgrade, this section will guide you through the process of applying the schema upgrade. |
| 13 | + |
| 14 | +First, stop the Icinga DB daemon. If you have an HA setup, stop all Icinga DB instances. |
| 15 | + |
| 16 | +``` |
| 17 | +systemctl stop icingadb |
| 18 | +``` |
| 19 | + |
| 20 | +Locate the required schema upgrade files in `/usr/share/icingadb/schema/mysql/upgrades/` for MySQL/MariaDB or in |
| 21 | +`/usr/share/icingadb/schema/pgsql/upgrades/` for PostgreSQL. The schema upgrade files are named after the new Icinga DB |
| 22 | +release and are mentioned in the specific section below. If you have skipped multiple Icinga DB releases, apply all |
| 23 | +schema versions in their order, starting with the earliest release. |
| 24 | + |
| 25 | +The following commands would apply the 1.2.1 schema upgrade to the `icingadb` database as the `icingadb` user. Please |
| 26 | +modify them for your setup and the schema upgrade you want to apply. |
| 27 | + |
| 28 | +* MySQL/MariaDB: |
| 29 | + ``` |
| 30 | + mysql -u icingadb -p icingadb < /usr/share/icingadb/schema/mysql/upgrades/1.2.1.sql |
| 31 | + ``` |
| 32 | +* PostgreSQL: |
| 33 | + ``` |
| 34 | + psql -U icingadb icingadb < /usr/share/icingadb/schema/pgsql/upgrades/1.2.1.sql |
| 35 | + ``` |
| 36 | + |
| 37 | +Afterwards, restart Icinga DB. If you have an HA setup, restart all Icinga DB instances. |
| 38 | + |
| 39 | +``` |
| 40 | +systemctl start icingadb |
| 41 | +``` |
5 | 42 |
|
6 | 43 | ## Upgrading to Icinga DB v1.2.1
|
7 | 44 |
|
|
0 commit comments