Nextcloud docker stuck in update

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): v25.0.1
Operating system and version (eg, Ubuntu 20.04): Unraid docker image
Apache or nginx version (eg, Apache 2.4.25): nginx 1.20.2
PHP version (eg, 7.4): 8.0

The issue you are facing:

Trying to update from command line, can’t get past step 6. I have tried the normal advice to move the updater_XXXXXXXXX folder and restart the update, but it won’t finish and even when I stop it it still won’t let me access the NC web interface, saying “Update in Progress”.

Is this the first time you’ve seen this error? Y:

Steps to replicate it:

  1. sudo -u XXX php /path/to/nextcloud/updater/updater.phar
  2. hangs on step 6, access to webgui blocked with Update in Progress message
  3. mv updater_XXXXXXXXX to rename the folder
  4. sudo -u XXX php /path/to/nextcloud/updater/updater.phar
  5. hangs on step 6, access to webgui still blocked with Update in Progress message
  6. repeat with no change in result

The output of your Apache/nginx/system log in /var/log/____:

file is empty

At the very least I would like to know how to restore from all the backups NC makes when it does these updates. I see where they are saved, but if there is a process I can use to restore to the nextcloud updater-created backups that would be grand

welcome to the forum @mdh1 :handshake:

I’m not familiar with unraid but for regular docker image (and docker in general) you must not run update inside of the container - just replace with newer image…

Docker image often write intersting logs to STDOUT (review with docker logs %container name%)

Thank you for your reply. Unfortunately Docker is where I’m weakest as well. It appears that the maintainer of the docker file expects the user to update Nextcloud independently for some reason, so just updating the docker won’t work. Do you have any process you could point me to to restore the working files from the backup that is created when an upgrade is attempted? My search of this documentation has only turned up how to restore from a full backup created from the GUI, which I can’t access.

Nextcloud upgrade itself doesn’t backup “files”… AFAIK there are some config backups but in general there database and storage backup are not part of the upgrade process. If you are looking to restore config backup: search through the forum, I remember discussions about recovering from failed upgrades but don’t have good reference handy…

I can still see my actual data is still in the correct location and is still accessbile from the file browser, so it is just the config/gui files I need to restore. Because of where the update failed it has cleaned out most of the actual files from my /nextcloud/ directory. I’ll keep looking on these forums to see if I can find a process, but at this point I might just try backing up my current folder and moving one of the backed up config folders into the working directory.

I really appreciate your replies. Overall I’m really liking NC, I just need to get it working and a bit more stable on the update process. It’s been fairly stable until the past couple of attempts

I think I solved this as far as functionality goes.

  1. BACK U&P YOUR DATA AND DATABASE!!! I didn’t lost anything that I can tell, but make sure that you’re covered in case you do
  2. Deleted the old nextcloud docker container
  3. Pulled a new docker version
  4. Edit the config.php file to point all the “db*” variables to the existing database.
  5. Add “‘installed’ => true” to the config.php file to bypass the initial admin user creation process.
  6. Restart nextcloud and it connected right up

I’m going to give it a few days before I try to do another update via CLI. This time was quite traumatic and time consuming to repair haha. Thanks again to wwe for your help.

if you

this will result in a next traumatic and time consuming experience. I suggest you familiarize you with a right way to perform upgrades in docker installation.