I am running my private Nextcloud instance using docker (docker-compose). I tried to upgrade to a newer Nextcloud version but did not realize I was not supposed to skip a major version (from 21 to 23). Now I cant start it at all:
- When I try to start the container with version 23 and trigger the upgrade, it fails because it cannot upgrade from 21:
leifb@***:~/nextcloud$ sudo docker-compose exec --user www-data app php occ upgrade Nextcloud or one of the apps require upgrade - only a limited number of commands are available [...] Exception: Updates between multiple major versions and downgrades are unsupported. Update failed [...]
- When I try to start the container with version <23, it fails because it thinks the data is from version 23:
app_1 | Can't start Nextcloud because the version of the data (23.0.3.2) is higher than the docker image version (22.2.6.2) and downgrading is not supported. Are you sure you have pulled the newest image version?
Is there a way to force a upgrade or starting with version 22?
Here is my docker-compose file:
version: '2'
volumes:
nextcloud:
db:
services:
db:
image: mariadb
restart: always
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=***
- MYSQL_PASSWORD=***
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
app:
image: nextcloud:22
restart: always
ports:
- 9009:80
links:
- db
volumes:
- nextcloud:/var/www/html
environment:
- MYSQL_PASSWORD=***
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_HOST=db
- OVERWRITEHOST=***
- OVERWRITEPROTOCOL=https
Thank you!