Gather upgrade hoelle/nextcloud howto's
Opened this issue · 4 comments
Add documentation how to upgrade major version
tldr; I've found the solution to the specific problem. It would be nice to gather more documentation to help other users.
Description
I've been happily using hoellen/nextcloud with mariadb:10 since at least Version 19.
The only thing that bugs me is the uncertainty with switching versions. I've just yesterday upgraded from 20.0 to 21.0 (worked fine) and from 21.0 to 22.0 (Login worked but failed to show dashboard showing a error msg)
Running docker-compose exec --user 991 nextcloud php /nextcloud/occ update:check
returned some messages and the first error was
In ExceptionConverter.php line 114:
An exception occurred while executing a query: SQLSTATE[HY000]: General error: 4047 InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.
Searching with google I've found https://www.reddit.com/r/NextCloud/comments/ncz7t6/error_when_upgrading/ with the mention to add innodb_read_only_compressed=OFF
to mysql.cnf
Which I translated with https://mariadb.com/kb/en/innodb-system-variables/ to the command-line argument --skip-innodb-read-only-compressed
So I've added the command to the docker-compose.yml
which now looks like this:
nc-db:
image: mariadb:10
hostname: nc-db
restart: always
volumes:
- ./nc-db:/var/lib/mysql
environment:
- MYSQL_ENV_STUFF=written_here
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_general_ci
- --skip-innodb-read-only-compressed
Adding this command and calling docker-compose up -d
gave me working 22.0 (yay!).
Looking back
Looking at the file I already had added the two other commands
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_general_ci
probably (can't remember exactly) they where needed for the 19.0 to 20.0 upgrade.
Conclusion
Finding those commands did take some time and it would be nice for other users if there was a place to gather them.
I never needed such things to do.
my docker-compose.yml
parts is very straight forward:
db:
image: mariadb:10.5
[...]
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
no command:
definition needed here. Maybe cause you are using mariadb 10.6 (which got recently GA) is causing such things?
Maybe cause you are using mariadb 10.6 (which got recently GA) is causing such things?
I am uncertain what mariadb:10 is exactly pointing at. But I could very possibly be the latest of version 10, which is 10.6 - Maria-DB Description on Docker-Hub
mariadb:10
points since 3 days to version 10.6
.
I also have my instances still on 10.5
, so thank you for sharing your insights. Could be useful for other people.
See nextcloud/server#25436. You should stay at mariadb:10.5
until this is solved.