Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade fails because of customize data_dir #675

Open
niko2 opened this issue Mar 3, 2024 · 2 comments
Open

upgrade fails because of customize data_dir #675

niko2 opened this issue Mar 3, 2024 · 2 comments

Comments

@niko2
Copy link

niko2 commented Mar 3, 2024

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

  • Hardware: VM
  • YunoHost version: 11.2.10.3 (latest)
  • I have access to my server: Through SSH + through the webadmin + direct access via console
  • Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: yes
    • nextcloud custom data_dir
  • If upgrading, current package version: can be found in the admin, or with yunohost app info $app_id
  • nextcloud has been removed during upgrade

Steps to reproduce

Upgrade nextcloud from 28.0.2ynh1 to 28.0.3ynh1 with custom data_dir

Expected behavior

  • Don't move data to defaut data_dir
  • Eventually fails but leave nextcloud intact in version 28.0.2~ynh1

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
Copy link
Member

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
Copy link
Author

niko2 commented Mar 3, 2024

I understand this is not supported (by install and upgrade scripts)
I followed the doc mentionned in this PR YunoHost/doc#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

@alexAubin alexAubin changed the title upgrade to latest version fails and app is removed upgrade fails because of customize data_dir Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants