# IcingaDB: unexpected database schema version: v3 (expected v4)

**URL:** <https://community.icinga.com/t/icingadb-unexpected-database-schema-version-v3-expected-v4/12438>\
**Category:** Icinga DB\
**Created:** [August 14, 2023, 8:03am UTC](https://community.icinga.com/t/icingadb-unexpected-database-schema-version-v3-expected-v4/12438 "2023-08-14T08:03:59Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![meisterpropper](https://community.icinga.com/user_avatar/community.icinga.com/meisterpropper/32/354_2.png) [@meisterpropper](https://community.icinga.com/u/meisterpropper)\
**Post date:** [August 14, 2023, 8:04am UTC](https://community.icinga.com/t/icingadb-unexpected-database-schema-version-v3-expected-v4/12438/1 "2023-08-14T08:04:00Z")

</div>

Hi,

I´ve searched a little bit at the community and it seems that there were similar problems, but I couldn´t solve it by the advices given so far. I can´t start IcingaDB anymore at my ubuntu vm. Error:  
` unexpected database schema version: v3 (expected v4), please make sure you have applied all database migrations after upgrading Icinga DB`

I´ve checked if there are open migration at icinga director and with

```auto
icingacli director migration pending --verbose

```

Also I tried:

```auto
 icinga-redis-cli flushall

```

But nothing helped so far: I haven´t found any upgrade schema at /usr/share/doc/icingadb/ or /usr/share/icingadb/schema/mysql/upgrades/ which could be related to the problem. The most recent upgrade version is 1.1.1.sql. Has anyone a hint, how I could solve / debug this further?

---

<div class="post-metadata">

**Author:** ![homerjay](https://community.icinga.com/user_avatar/community.icinga.com/homerjay/32/377_2.png) [@homerjay](https://community.icinga.com/u/homerjay)\
**Post date:** [August 14, 2023, 11:44am UTC](https://community.icinga.com/t/icingadb-unexpected-database-schema-version-v3-expected-v4/12438/2 "2023-08-14T11:44:41Z")

</div>

Hi.

As you said, there is a schema upgrade to 1.1.1.  
Did you do this schema upgrade to version 1.1.1?

E.g.:

```auto
mysql -u root -p icingadb < /usr/share/icingadb/schema/mysql/upgrades/1.1.1.sql

```

This solved the problem for me.

Edit: [Releasing Icinga DB 1.1.1](https://icinga.com/blog/2023/08/09/releasing-icinga-db-1-1-1/)

Greetings.

---

<div class="post-metadata">

**Author:** ![meisterpropper](https://community.icinga.com/user_avatar/community.icinga.com/meisterpropper/32/354_2.png) [@meisterpropper](https://community.icinga.com/u/meisterpropper)\
**Post date:** [August 14, 2023, 12:04pm UTC](https://community.icinga.com/t/icingadb-unexpected-database-schema-version-v3-expected-v4/12438/3 "2023-08-14T12:04:30Z")

</div>

Thanks, that did the trick. The version numbers at the log were misleading.

---

<div class="post-metadata">

**Author:** ![Katzentier](https://community.icinga.com/letter_avatar_proxy/v4/letter/k/73ab20/32.png) [@Katzentier](https://community.icinga.com/u/Katzentier)\
**Post date:** [July 10, 2025, 9:06am UTC](https://community.icinga.com/t/icingadb-unexpected-database-schema-version-v3-expected-v4/12438/4 "2025-07-10T09:06:09Z")

</div>

Can I somehow prevent icinga from auto-updating? So that I can prevent the mismatch between icinga, icingadb and the mysql database scheme?

And instead do the update of the packages and scheme manually?

---

<div class="post-metadata">

**Author:** ![moreamazingnick](https://community.icinga.com/user_avatar/community.icinga.com/moreamazingnick/32/7725_2.png) [@moreamazingnick](https://community.icinga.com/u/moreamazingnick)\
**Post date:** [July 10, 2025, 9:26am UTC](https://community.icinga.com/t/icingadb-unexpected-database-schema-version-v3-expected-v4/12438/5 "2025-07-10T09:26:59Z")

</div>

if you are on debian/ ubuntu you can do an apt-mark hold

---

<div class="post-metadata">

**Author:** ![apenning](https://community.icinga.com/user_avatar/community.icinga.com/apenning/32/7669_2.png) [@apenning](https://community.icinga.com/u/apenning)\
**Post date:** [July 10, 2025, 9:34am UTC](https://community.icinga.com/t/icingadb-unexpected-database-schema-version-v3-expected-v4/12438/6 "2025-07-10T09:34:00Z")

</div>

> [@Katzentier](#):
>
> Can I somehow prevent icinga from auto-updating?

There is no auto-updating mechanism in Icinga. Updates are only triggered by your package manager.

If you are manually performing upgrades, you can hold packages as @moreamazingnick suggested. If you are using unattended upgrades, you can exclude packages (`Unattended-Upgrade::Package-Blacklist` for Debian/Ubuntu).

In general, it is advisable to not auto-upgrade Icinga packages since there are certain version upgrades requiring manual intervention. Personally, I have excluded all `icinga` packages from unattended upgrades and monitor required upgrades to not miss any.

---

<div class="post-metadata">

**Author:** ![Katzentier](https://community.icinga.com/letter_avatar_proxy/v4/letter/k/73ab20/32.png) [@Katzentier](https://community.icinga.com/u/Katzentier)\
**Post date:** [July 11, 2025, 12:40pm UTC](https://community.icinga.com/t/icingadb-unexpected-database-schema-version-v3-expected-v4/12438/7 "2025-07-11T12:40:58Z")

</div>

thanks, of course I could put packages on hold. I thought Icinga itself also had some kind of mechanism itself.

Then I will chose the option to configure it via package manager.
