Upgrading Icinga-Web and Icinga-Web Database
Prev | Chapter 6. User Interfaces | Next

## Upgrading Icinga-Web and Icinga-Web Database

Upgrading Icinga-Web

If there's a new Icinga-Web version available on http://www.icinga.org/ you should consider updating. Newer versions contain bugfixes, minor or major, which makes it even more important to get the latest and the greatest. If you already installed Icinga-Web; using the installing guide it's rather easy to install newer version.

Make sure you'll have a safe backup of your Icinga-Web installation and your configs (if you stored your customised configuration in *.site.xml- Files, they won't be overwritten during the upgrade process!). If anything goes wrong you can restore your old setup rather easy.

Regular updates of Icinga-Web are possible by just by re-installing Icinga-Web. Please keep in mind that `configure` requires the same parameters as before - look it up in `config.log` and save that in a safe location.

Please make sure, that you have already installed the appropriate Icinga-API version. Installing the Icinga-API is described in the Icinga-API section.

The Upgrade

Please download the archive from http://sourceforge.net/projects/icinga/files/ or take your clone from the icinga-web.git to get the freshest branch:

     #> git clone git://git.icinga.org/icinga-web.git

Unpack your tarball:

     #> tar xzvf icinga-web-1.4.0.tar.gz

Then change to the directory:

     #> cd icinga-web-1.4.0

Icinga-Web provides several configure options e.g.

     #> ./configure
                    --prefix=/usr/local/icinga-web
                    --with-web-user=www-data
                    --with-web-group=www-data
                    --with-web-path=/icinga-web
                    --with-web-apache-path=/etc/apache2/conf.d
                    --with-db-type=mysql
                    --with-db-host=localhost
                    --with-db-port=3306
                    --with-db-name=icinga_web
                    --with-db-user=icinga_web
                    --with-db-pass=icinga_web
                    --with-icinga-api=/usr/local/icinga/share/icinga-api
                    --with-api-type=APICON API type (default CONNECTION_IDO)
                    --with-api-subtype=TYPE DB driver or network connection
                    --with-api-host=HOST Host to connect (DB or other) (default localhost)
                    --with-api-port=PORT Port for connection (default 3306)
                    --with-api-socket=PATH Path to socket (default none)

| Note
Keep in mind that you configure the Icinga Web database not the Icinga IDOUtils database! User and group name of the web process depend on the distribution used.

Please use:

     #> ./configure --help

to see all configure options.

| Note
Using no options the installer expects the Icinga-API to be found at /usr/local/icinga/share/icinga-api.

Per default the Icinga-Web will be updated to /usr/local/icinga-web using:

     #> ./configure
     #> make upgrade

| Note
After changing any configs you need to clear the config cache!

     #> rm -rf app/cache/config/*.php

or /path/to/clearcache.sh

     #> /usr/local/icinga-web/bin/clearcache.sh

Any errors? Take a look here.

Upgrading the Icinga-Web Database

This is optional, but there may be a bug within the database scheme which has been fixed. If you are upgrading from an older Icinga-Web database version you also need to apply those fixes manually. If you are using rpm/deb packages please read the notes and/or ask the maintainer if he has added those modifications to the install routine.

| Note
Depending on the changes to be done and the size of your database it may take a while to update your database. Please try to be patient and don't abort the script as it may leave the data being corrupt.

The upgrade files can be found next to the database install files in `/path/to/icinga-web/etc/schema/updates/`. The syntax is as follows:

`<rdbm>_<old-version>_to_<new-version>.sql`

where <rdbm> could be mysql, pgsql or oracle and <newversion> points to the version you want to upgrade to.

| Note
If you are upgrading from an older version and there are other versions in between be advised that you need to apply those upgrade files with incremental steps!

1. Backup your current database before upgrading!

2. Check current Icinga-Web database version and the target version. Check if there are any version in between and upgrade incremental if necessary.

3. Apply the upgrade(s) using a rdbm user with appropriate rights.

MySQL

     $ mysql -u root -p icinga_web < /path/to/icinga-web/etc/schema/updates/mysql_<oldversion>_to_<newversion>.sql

Postgresql

     #> su - postgres
     $ psql -U icinga_web -d icinga_web < /path/to/icinga-web/etc/schema/updates/pgsql_<oldversion>_to_<newversion>.sql

Oracle

     #> su - oracle
     $ sqlplus dbuser/dbpass
     SQL> @oracle_<oldversion>_to_<newversion>.sql

That's all.

Prev | Up | Next
Installation of the Icinga-Web Frontend | Home | Configuration Overview of Icinga-Web

© 2009-2011 Icinga Development Team, http://www.icinga.org