From c4eed9d8ea307b598527b29b72012f5c3888479a Mon Sep 17 00:00:00 2001 From: 3wc <3wc@doesthisthing.work> Date: Thu, 24 Mar 2022 03:17:29 +0200 Subject: [PATCH] Add upgrade fixing before I forget it again --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index c3585d2..f00e4d8 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,26 @@ Fully automated luxury Nextcloud via docker-swarm. `abra app run --user www-data YOURAPPDOMAIN app occ app:update --all` +## How do I fix a Nextcloud version snafu? + +`Exception: Updates between multiple major versions and downgrades are unsupported.` + +Solution: + +- Look at log files to determine the old Nextcloud version +- Change your local `~/.abra/recipes/nextcloud/compose.yml` to the highest minor + version in the old version -- e.g. choose `22.2.5` for `22`, if you're + upgrading to `23`. +- Then, do one of (both bad): + 1. `abra app deploy --chaos ...`, then `app run` to go in and manually lower the version number in PHP (shell in, `apt install vim-core && vi version.php`), then try `php ./occ upgrade` + 2. `abra app undeploy ...`, `abra volume rm`, CAREFULLY only choose the volume + ENDING `_nextcloud`, then `abra app deploy --chaos ...`, then edit the + `compose.yml` to add `entrypoint: ['tail', '-f', '/dev/null']` to `app`, + then `app deploy --chaos` again, then `app run --user=www-data ... app bash` to get in and run `./occ maintenance:repair`, and `./occ upgrade`. +- Change `compose.yml` to the new version number; `git checkout compose.yml` +- `abra app deploy --force` +- This wasn't even multiplle major versions was it 😾 + ## How do I integrate with Keycloak SSO? Use [this plugin](https://github.com/pulsejet/nextcloud-oidc-login). Unlike the plugin it's forked from, there is no configuration UI, so you'll need to edit `/var/www/html/config/config.php`: