Stuck in NCP upgrade from 18 to 20

Running NextCloudPi in docker with nc-autoupdate-nc enabled.

For a long time there was not enough space on the rootfs, so my NextCloudPi instance couldn’t upgrade automatically to newer versions.

Then I finally had the time to get enough space. Because of nc-autoupdate-nc the instance automatically updated from nc18 to 20.0.4.0.

Now I can’t enter Nextcloud because it wants to update the apps, but it can’t because there were two major version changes.

I pulled the newest docker image, but that didn’t help. How can I now gently upgrade? Is it possible to restore the earlier version somehow and then update first to nc19 and finally to nc20 as we are supposed to do?

NextCloudPi: v1.34.6
NextCloud: 20.0.4.0
Docker image: NextCloudPi_docker_01-19-21

Any help would be appreciated.

@hunhejj maybe you should disable all apps that are not included by default with a terminal command ( i don’t know the command for Nextcloudpi. For native installation this is sudo -u www-data php occ app:disable NameOfTheApp ).
after that do the upgrade.
after upgrading your nextcloud, you can upgrade your apps.

When I originally tried to finish the update, I got the following error:

Exception: Updates between multiple major versions and downgrades are unsupported.

Why do you think @Mageunic, that disabling some apps would solve the above issue? :thinking:

skipping NC versions is not supported by nc-update-nextcloud
https://docs.nextcloudpi.com/en/staying-up-to-date/

Use nc-restore to return to 18 then update to 19.0.n (n=highest available), then to 20.0.4

Is there a way to return to 18 if I don’t have a backup @OliverV?

Not really, your data (files), might still be there tho. (if possible, make a copy to another drive)
Then, can start from a new install, re-create users, set config /path/to/data manually and run nc-scan. Or upload them again from PC.

The data itself is fortunately backed up on a PC. I just realized that I set up an automated backup (without the data files though) back then and indeed 3 days ago a backup was created.
Is there a way to restore that dataless backup without creating a fresh install and loosing all the users and settings, etc? And what happens to the files that were added/modified since the backup? Can I simply leave them there in place and run a scan after I restored all?

yes, you can use ncp-config>>BACKUPS>>nc-restore for that.
nc-restore will run nc-scan too.

Thanks @OliverV, I will try that then (and cross my fingers that I understood correctly what to do:)

Just for the record, this is what I did in the end:

  1. reverted version.php to reflect the previous version (18.x.x)
  2. moved all my files before they get accidentally deleted
  3. started the old docker container and did a restore from an earlier auto-backup
  4. then updated nc step by step (first to last version of 18, then to last version of 19 and finally to the most recent version)
  5. removed the old docker container
  6. pulled the latest docker image
  7. moved all my files back
  8. Ran an nc-scan

The result

  • nextcloud users were kept
  • no data loss
  • however all share info, etc. were lost

Btw. I made a small test in advance: I restored the backup while having some of the files in place, but they were deleted after the restore instead of getting rescanned.

I appreciate all your help @OliverV! :clap: