YunoHost-Apps / nextcloud_ynh

Nextcloud package for YunoHost
https://nextcloud.com/
GNU Affero General Public License v3.0
144 stars 62 forks source link

upgrade fails because of customize data_dir #675

Open niko2 opened 4 months ago

niko2 commented 4 months ago

Describe the bug

Running nextcloud 28.0.2~ynh1 with custom data_dir Upgrade to 28.0.3~ynh1 starts by moving data from custom data_dir to default deta_dir Then fails and leave nextcloud uninstalled The step that failed was restauration because data has been moved during upgrade (see logs below)

Several actions should not occured, so not sure where is the bug

Context

Steps to reproduce

Upgrade nextcloud from 28.0.2~ynh1 to 28.0.3~ynh1 with custom data_dir

Expected behavior

Logs

Backup creation (OK): https://paste.yunohost.org/raw/wepetegacu Upgrade (KO): https://paste.yunohost.org/raw/iwimagifig Restore (KO): https://paste.yunohost.org/raw/atiyetubih Remove app (OK): https://paste.yunohost.org/raw/etadacicej

alexAubin commented 4 months ago

Can you elaborate how you "customized" the data dir ? As far as I know all methods apart from using bind mounts will lead to this kind of stuff and there's not much we can do to fix it as this is kind of the excepted behavior

niko2 commented 4 months ago

I understand this is not supported (by install and upgrade scripts) I followed the doc mentionned in this PR https://github.com/YunoHost/doc/pull/2415 TLDR; I installed nextcloud, I moved data to the new directory and I updated configuration using yunohost app setting nextcloud data_dir -v /new/data/path

Since it is not supported, should the upgrade script move the data or just fail ?

The upgrade process broke my system. I guess I need to restore the backup; I hope it will work