Nextcloud - Update and restore failed

Hello!

I’ve been using YunoHost for several years now. I’ve had very, very few hiccups over time, and I am very grateful for that. AND the hard work of everyone involved in the project!

Without further ado, the support request template:

My YunoHost server

Hardware: VPS - 1 GB of RAM, 25 GB storage, 1 processor. Currently increased to 2GB of RAM.
YunoHost version: 11.2.10.1
I have access to my server : Through SSH and through the webadmin
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : Yes
If yes, please explain: Manual SSH config from before it was doable through YunoHost itself if I recall correctly.
If your request is related to an app, specify its name and version: Nextcloud 27.1.4~ynh1 / 28.0.2~ynh1

Description of my issue

I have attempted to perform the upgrade for Nextcloud from 27.1.4~ynh1 to 28.0.2~ynh1. This was after a system update and YunoHost update from 11.2.7.? to 11.2.10.1.

It looks like everything went fine until it attempted to connect to the database while updating the weather status app within Nextcloud. I’m quite certain that I had updated all the Nextcloud apps before performing the Nextcloud update itself.

I have no reason to think the database service was offline because of the system update when this happened.

The restore seems to have also failed because it could not connect to the database.

I will go ahead and presume this may have happened because the VPS ran out of memory and the database engine had to shut down or crashed, as when I went to install Nextcloud, there was a warning about not enough memory being available.

I have increased the resources on the VPS and would like now to restore Nextcloud, if possible.

I have included the logs below in case they are of help to restore Nextcloud and if they can confirm to someone more experienced/knowledgeable than me if it could be memory related or if something bigger is underlying.

Failed upgrade log: https://paste.yunohost.org/raw/sucejubofu
Failed restore log: https://paste.yunohost.org/raw/udayopabad

There is some problem with MariaDB on your system. Is the service running? Are you not out of disk space?

Hi orhtej2!

Thanks for your response.

MariaDB is currently up and running and 8.4 GiB of storage space left out of 25 GiB.
Obviously, when the failures occurred, MariaDB had definitely stopped, but I doubt storage had filled up to the point of being full. I did not myself delete anything, but I know that after the failed restore it seems that Nextcloud has been removed from the server because it is not in the list of installed apps.

As mentioned, I have increased resources for the VPS after those failures, but it was the RAM only. This operation has involved powering off the VPS and powering it back up, so this is likely why MariaDB is running now.

The mysql service journal is empty when I look in the web admin console, so that is likely not very helpful.

Would it be possible to restore at this point? Do I have to just install Nextcloud anew and reconfigure? Or is a configuration restorable onto a new install?

Pre-upgrade backup was retained and is available in web admin, data folder should have been left untouched so please do try restoring again!

I’ll be honest: I have had so little problems with YunoHost that I had completely forgotten about the Backup section of the web admin.

I am attempting to restore now!

Edit: Restore failed, apparently because the Nextcloud database still exists.
Log: https://paste.yunohost.org/raw/oxukaguruf

Will I need to get fancy and delete the database manually?

I think yes, you can always dump its contents to a file just in case you need that specific version later.

So, after letting this rot for a little while, I installed phpMyAdmin to go and rename the database… Lo and behold! It was no longer there!

Restoring the NextCloud backup worked this time.

I’m going to assume that perhaps the database was removed automatically at some point… :sweat_smile:

1 Like

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