Error while upgrading Nextcloud from version 32.0.6~ynh2 to 33.0.1~ynh1 on YunoHost

What app is this about, and its version: 32.0.6~ynh2
What YunoHost version are you running: 12.1.39
What type of hardware are you using: VPS bought online

Describe your issue

I encountered an error while updating.

(nextcloud) 32.0.6~ynh2 ile 33.0.1~ynh1 versiyon

Share relevant logs or error messages

Hata: “500”

Eylem: “PUT” /yunohost/api/apps/nextcloud/upgrade

Hata mesajı:
Aborting the upgrade, because a safety backup could not be created (Failed to collect files to be backed up)

Eylem gerçekleştirilirken sunucu şunları söyledi:

Collecting files to be backed up for nextcloud…
Declaring files to be backed up…
/home/yunohost.app/nextcloud will not be saved, because ‘BACKUP_CORE_ONLY’ is set.
File or folder ‘/etc/php/8.3/fpm/pool.d/nextcloud.conf’ to be backed up does not exist
Failed to collect files to backed up for nextcloud.

(nextcloud) 32.0.6~ynh2 ile 33.0.1~ynh1 versiyon

https://paste.yunohost.org/raw/yefesirape

1 Like

same here

The solution is here: Nextcloud update failed because a safety backup could not be created - #7 by CypLef

Same here too, could not restore the backup either

https://paste.yunohost.org/raw/ujedijedal

seems very similar: brunogiscoat

update from 32.0.7~ynh1 to 33.0.1~ynh1: 20260331-155444-app_upgrade-nextcloud.log

paste.yunohost.org/raw/osokapawod

ERROR
removing nextcloud: 20260331-155601-app_remove-nextcloud

paste.yunohost.org/raw/olenanecap

restore nextcloud from backup: 20260331-155652-backup_restore_app-nextcloud.log

paste.yunohost.org/raw/owikekufim

Could not restore nextcloud: An error occured inside the app restore scrip

but now I have no nextcloud at all…

My upgrade failed because of an incompatible app. But then the restoration also is failing because of another app: Memories. It is now stuck in the terminal during mysql database restoration:
Info: [#####++…] > Restoring the MySQL database…
Warning: --------------
Exception in thread Thread-35:
Traceback (most recent call last):
File “/usr/lib/python3.11/threading.py”, line 1038, in _bootstrap_inner
self.run()
File “/usr/lib/python3/dist-packages/yunohost/utils/process.py”, line 157, in run
self.queue.put((self.log_callback, line.decode(“utf-8”).strip(“\n”)))
^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xe6 in position 39: invalid continuation byte
Warning: INSERT INTO memories_planet_geometry VALUES

How do I continue? Should I stop the process?

I canceled using ctrl-c and then it rolled back the restoration so that Nextcloud was cleanly uninstalled. I then started the restoration manually and it worked! At least I have my old Nexcloud back and running now.

I got an error upgrading to NC 33, saying that the Memories app is incompatible with NC 33. The script then tried to restore from pre-upgrade backup, but failed, without a clear error at the end, but seemingly stuck in a loop. I then tried to manually restore from backup via CLI using `sudo yunohost backup restore nextcloud-pre-upgrade1 --apps nextcloud`. This failed as well, again without an error, but seemingly stuck. Logs attached. Now trying restore from webadmin, but it is still working.

https://paste.yunohost.org/raw/visereqeto

Indeed, the Memories app does not appear to be compatible with NC 33.

Disable Memories app

cd /var/www/nextcloud
sudo -u nextcloud php8.3 occ app:disable memories

These are the final lines in the log of the restore operation:

2026-04-01 03:45:07,904: DEBUG - + find /home/yunohost.app/nextcloud/data/ -type d -print0
2026-04-01 03:45:08,230: DEBUG - + xargs -r0 chmod 0750

It seems stuck on changing the permissions. And there is a defunct `chmod` process

root 2231828 1.0 0.0 7416 2952 ? D 03:45 1:41 find /home/yunohost.app/nextcloud/data/ -type d -print0
root 2231829 0.0 0.0 5732 2020 ? S 03:45 0:01 xargs -r0 chmod 0750
root 2245616 0.0 0.0 0 0 ? Z 06:29 0:00 [chmod]

Should I kill the restore? Or let it continue?

EDIT: apparently the restore finished succesfully in the end:

started_at: 2026-03-31 20:46:47.083901
started_by: admin
success: true
yunohost_version: 12.1.39

But now there is another issue:

sudo -u www-data php /var/www/nextcloud/occ status
Cannot write into “config” directory!
This can usually be fixed by giving the web server write access to the config directory.

But, if you prefer to keep config.php file read only, set the option “config_is_read_only” to true in it.
See Configuration Parameters — Nextcloud latest Administration Manual latest documentation
{“reqId”:“Xx7I7Uiaz4ohTjLruJWY”,“level”:3,“time”:“2026-04-01T07:10:21+00:00”,“remoteAddr”:“”,“user”:“–”,“app”:“PHP”,“method”:“”,“url”:“–”,“scriptName”:“/var/www/nextcloud/occ”,“message”:“fopen(/var/www/nextcloud/config/config.php): Failed to open stream: Permission denied at /var/www/nextcloud/lib/private/Config.php#210”,“userAgent”:“–”,“version”:“”,“occ_command”:[“/var/www/nextcloud/occ”,“status”],“data”:{“app”:“PHP”}}

EDIT2:
I fixed the permissions, and set the “config_is_read_only” to true in the config file, and now it’s working again!

I can’t upgrade either.

There is lots of this and then it fails.

Warning:   Command "/var/www/nextcloud/cron.php" is not defined.
Warning:   Command "/var/www/nextcloud/cron.php" is not defined.
Warning:   Command "/var/www/nextcloud/cron.php" is not defined.
Warning:   Command "/var/www/nextcloud/cron.php" is not defined.

Log: https://paste.yunohost.org/raw/lagukubupo

SOLVED. Totally forgot I had Memories plugin installed.

2026-04-02 07:55:21,412: ERROR - Failed to upgrade nextcloud: An error occurred inside the app upgrade script : The following apps are not (yet?) compatible with Nextcloud 33. You should make sure to upgrade the app, or disable it, or wait for it to become compatible before running this upgrade : memories

See previous post.

1 Like