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.
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:checkreturned some messages and the first error wasSearching 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=OFFtomysql.cnfWhich I translated with https://mariadb.com/kb/en/innodb-system-variables/ to the command-line argument
--skip-innodb-read-only-compressedSo I've added the command to the
docker-compose.ymlwhich now looks like this:Adding this command and calling
docker-compose up -dgave me working 22.0 (yay!).Looking back
Looking at the file I already had added the two other commands
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.