Possible to Recover a Failed Update?

So first, shame on me for not understanding that the updater automated backup isn’t exactly a full backup and also for not having better backups taken manually before starting the update. I’ve been quite lucky though as in the 3 years I’ve been updating this installation, this is the first time I’ve had a problem.

What happened - during the update (using the web-updater) my VPS hung and crashed (I believe due to something unrelated to the nextcloud update - just poor timing). This seems to have left me stuck in the update after rebooting the server. It said it was stuck in step 10 - moving files.

Luckily, I’m the only user, and the main/only thing I used it for recently was cloud storage, and all of my files were synced to my laptop anyway. So I suppose the simple answer is to just re-install and configure nextcloud again and resync my local files. I was using it for recipe storage too, but I’ve been moving those to my main website, so no big loss there.

I guess I’m just curious though to learn a little more and see if anyone could point me in the right direction if there is a way to possibly recover the existing installation or fix/finish the update in some way.

And yes, I will be setting up a proper backup routine if/when I get this up and running again.

First of all backup the DB now, if it was stuck on the moving file step, you should be OK. The big pain is if the update damages the DB, files are easy enough to move back into place.

First were you using the cli update or web interface? if it’s the web interface running the update via the cli usually will sort things out.

When I borked an update in the past it was a simple case of replacing all the Nextcloud files, copying the user data and pointing the fresh install at the existing DB. Then of course installing the missing apps.


Hi, thanks so much for replying.

When the VPS crashed, I was updating via the web updater. And I did try running the updater again via CLI after getting the server back online and I get the following:

Nextcloud Updater - version: v27.1.0rc3-15-gfa7af53

Step 10 is currently in process. Please call this command later.

So if I backup the DB and just basically re-install Nextcloud to the folder and re-set it up, then I should pretty much be back in business. That’s kind of what I was thinking of trying so thanks for the confirmation! I appreciate it.

Well, it seems to have worked out ok. I downloaded the latest zip, extracted it to the directory overwriting the files there.

At first I was attempting to use occ to run a maintenance:repair or app:install, but I couldn’t seem to get that the work. I went to the webpage and it actually loaded and said maintenance mode was on. I used occ to turn maintenance mode off, refreshed the page, and it showed an update page and asked to confirm to upgrade apps. I said sure. And it did. And everything appears to be fine. now.

Nice recovery after all. Thanks for the nudge!


Perhaps a few small tips:

a.) You should always use the CLI updater in future.

b. You can also use Backup and Restore to get back to the original version in the event of an error if the actions you have performed do not work. You can omit the big directory data/updater-****/backups from the backup because it includes only old backup versions created from Nextcloud updater.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.