# Upgrading from 23 to 25

**URL:** <https://help.nextcloud.com/t/upgrading-from-23-to-25/155171>\
**Category:** ℹ️ Support\
**Tags:** update\_problems, docker\
**Created:** [February 6, 2023, 9:58am UTC](https://help.nextcloud.com/t/upgrading-from-23-to-25/155171 "2023-02-06T09:58:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![krono86](https://help.nextcloud.com/letter_avatar/krono86/32/5_5575768a8748004e209b776fc1b2916d.png) [@krono86](https://help.nextcloud.com/u/krono86)\
**Post date:** [February 6, 2023, 9:58am UTC](https://help.nextcloud.com/t/upgrading-from-23-to-25/155171/1 "2023-02-06T09:58:09Z")

</div>

> **Support intro**
>
> Sorry to hear you’re facing problems 🙁
> 
> _**[help.nextcloud.com](http://help.nextcloud.com) is for home/non-enterprise users. If you’re running a business, paid support can be accessed via [portal.nextcloud.com](http://portal.nextcloud.com) where we can ensure your business keeps running smoothly.**_
> 
> In order to help you as quickly as possible, before clicking **Create Topic** please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:
> 
> ```
> example
> 
> ```
> 
> Or for longer, use three backticks above and below the code snippet:
> 
> ```auto
> longer
> example
> here
> 
> ```
> 
> Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can ❤

Nextcloud version _(eg, 20.0.5)_: `23.0.0.10`  
Operating system and version _(eg, Ubuntu 20.04)_: `latest official docker`  
Apache or nginx version _(eg, Apache 2.4.25)_: `latest official docker`  
PHP version _(eg, 7.4)_: `latest official docker`

The issue you are facing:

After some years I tried to update my nextcloud instance.  
I’m running nextcloud by a docker-compose script.  
Specifically, I run

```auto
docker-compose pull
docker-compose up -d

```

Now I have the instance in maintenence mode.  
I exited from maintenence mode using occ in the container and the upgrade to version 25 is proposed on the web browser. The problem is that it fails because I’m running version 23.0.0.10 (as I can see using occ).  
How should I solve my problem now?  
Thanks for help.

Ivan

---

<div class="post-metadata">

**Author:** ![KarlF12](https://help.nextcloud.com/user_avatar/help.nextcloud.com/karlf12/32/46873_2.png) [@KarlF12](https://help.nextcloud.com/u/KarlF12)\
**Post date:** [February 6, 2023, 12:57pm UTC](https://help.nextcloud.com/t/upgrading-from-23-to-25/155171/2 "2023-02-06T12:57:01Z")

</div>

Skipping major versions in an upgrade is not supported. You would need to upgrade to NC 24 first by using the appropriate Docker image tag (e.g. image: nextcloud:24).

---

<div class="post-metadata">

**Author:** ![krono86](https://help.nextcloud.com/letter_avatar/krono86/32/5_5575768a8748004e209b776fc1b2916d.png) [@krono86](https://help.nextcloud.com/u/krono86)\
**Post date:** [February 6, 2023, 2:56pm UTC](https://help.nextcloud.com/t/upgrading-from-23-to-25/155171/3 "2023-02-06T14:56:51Z")

</div>

Thanks for replying!  
I tried upgrading to 24 usign the image nextcloud:24, but in that case the container continuously restart.  
Have you got any idea?

Ivan

---

<div class="post-metadata">

**Author:** ![KarlF12](https://help.nextcloud.com/user_avatar/help.nextcloud.com/karlf12/32/46873_2.png) [@KarlF12](https://help.nextcloud.com/u/KarlF12)\
**Post date:** [February 6, 2023, 3:19pm UTC](https://help.nextcloud.com/t/upgrading-from-23-to-25/155171/4 "2023-02-06T15:19:22Z")

</div>

Run `docker compose logs` to see if there’s some error. It may be safer to restore from backup to version 23 if it’s really broken.

---

<div class="post-metadata">

**Author:** ![krono86](https://help.nextcloud.com/letter_avatar/krono86/32/5_5575768a8748004e209b776fc1b2916d.png) [@krono86](https://help.nextcloud.com/u/krono86)\
**Post date:** [February 6, 2023, 3:23pm UTC](https://help.nextcloud.com/t/upgrading-from-23-to-25/155171/5 "2023-02-06T15:23:18Z")

</div>

Find the logs below.

```auto
[ERROR] Incorrect definition of table mysql.column_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255).
[ERROR] Incorrect definition of table mysql.column_stats: expected column 'hist_type' at position 9 to have type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB','JSON_HB'), found type enum('SINGLE_PREC_HB','DOUBLE_PREC_HB').

```

Maybe the database has been upgraded and not the application?

Ivan

[EDIT]  
I solved these errors using the solution in

> [@Incorrect definition of table mysql.column\_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255)](https://help.nextcloud.com/t/incorrect-definition-of-table-mysql-column-stats-expected-column-histogram-at-position-10-to-have-type-longblob-found-type-varbinary-255/145513):
>
> Although all seems to run fine, when I call the page /settings/admin/overview in my browser, I get these errors in my log [ERROR] Incorrect definition of table mysql.column\_stats: expected column 'histogram' at position 10 to have type longblob, found type varbinary(255). [ERROR] Incorrect definition of table mysql.column\_stats: expected column 'hist\_type' at position 9 to have type enum('SINGLE\_PREC\_HB','DOUBLE\_PREC\_HB','JSON\_HB'), found type enum('SINGLE\_PREC\_HB','DOUBLE\_PREC\_HB'). Nextc…

Now I obtain the following error in logs.

```auto
app_1 | Can't start Nextcloud because the version of the data (25.0.3.2) is higher than the docker image version (24.0.9.2) and downgrading is not supported. Are you sure you have pulled the newest image version?

```

[EDIT 2]  
I managed the last issue using the solution at:

> [@Can't start Nextcloud because the version of the data is higher than the docker image version and downgrading is not supported](https://help.nextcloud.com/t/cant-start-nextcloud-because-the-version-of-the-data-is-higher-than-the-docker-image-version-and-downgrading-is-not-supported/109438):
>
> Nextcloud version (eg, 20.0.5): 19.0.3.1 Operating system and version (eg, Ubuntu 20.04): Docker Image 19.0.3.1 Apache or nginx version (eg, Apache 2.4.25): Docker Image 19.0.3.1 PHP version (eg, 7.4): Docker Image 19.0.3.1 The issue you are facing: I accidentally pulled the v21 docker image while my NC installation was still 19.0.3.1. After noticing the error, I followed the advice from the linked how-to thread [Updates between multiple major versions are unsupported - #27](https://help.nextcloud.com/t/updates-between-multiple-major-versions-are-unsupported/7094/27) and tried to upg…

Now I’m manually upgrading to 24.

[EDIT 3]  
Now the upgrade to 25 went flawless.  
Thanks for helping!

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 14, 2024, 11:57am UTC](https://help.nextcloud.com/t/upgrading-from-23-to-25/155171/6 "2024-12-14T11:57:05Z")

</div>


