Nextcloud Update Stuck

Nextcloud Update Stuck
Photo by Pero Kalimero / Unsplash

My Nextcloud instance failed today using the web uploader. It failed around the backup or download stage of the update. I went to the command line on the server and ran the CLI command to update:

sudo -u www-data php /usr/share/nginx/nextcloud/updater/updater.phar -vv

(note I'm using nginx as the web server)

This command failed with an error Step 4 is currently in process. Please call this command later.

To get around this, I ran the maintenance command first:

sudo -u www-data php /usr/share/nginx/nextcloud/occ maintenance:repair

After that command completed I was able to run the CLI update again without issue:

sudo -u www-data php /usr/share/nginx/nextcloud/updater/updater.phar -vv

When the update was finished I ran the regular db clean-up I've come accostomed to running after any NC update:

sudo -u www-data php occ db:add-missing-indices
sudo -u www-data php occ db:add-missing-columns