Hardware: Old laptop or computer. YunoHost version: 11.2.3 (stable) I have access to my server : Through SSH | 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: my Nextcloud data is installed in an external storage disk If your request is related to an app, specify its name and version: upgrade from 26.0.2~ynh1 to 27.0.1~ynh1
Description of my issue
Hello I have Nextcloud installed on Yunohost, but I followed the official tutorial to put my data on an external drive (because I need larger capacity to store my files).
Nextcloud was working fine until the update. Apparently, it encountered an error at the restore stage. Now, if I go to my applications, Nextcloud has disappeared, as if it had never been installed. I’m linking you to the yunopaste, could you please help me :
Can you elaborate how you did that exactly ? The root cause of the issue is tied to the fact that /home/yunohost.app/nextcloud/ doesn’t exists / is empty
Hmf that tutorial doesn’t seem to create any symlink for the initial /home/yunohost.app/nextcloud directory to the new place … I’m skeptical that this is the real “proper” way to do things (assuming there is one)
Anyway, naively I would try to run : mount --bind /hdd/nextcloud_data/nextcloud /home/yunohost.app/nextcloud
And then try to restore the backup … Though even if that works that should not be the end of the story, you may want to add some rule to /etc/fstab to automatically mount the folder on boot/reboot
Thank you, I have run mount --bind /hdd/nextcloud_data/nextcloud /home/yunohost.app/nextcloud successfully,
However, when I tried to update again, there was no Nextcloud in the list of updates, so I looked in my list of applications (hoping that Yunohost had updated Nextcloud in hidden), but Nextcloud is no longer there. It means Nextcloud is no more considered as installed in my Yunohost.
For your information, the HDD is already listed in /etc/fstab to automatically mount the folder on reboot.
Should I reinstall Nextcloud and then repeating the previous command (mount --bind /hdd/nextcloud_data/nextcloud /home/yunohost.app/nextcloud) ?
Thank you, following your advice, I was able to restore the application! I put this post as the solution just to keep track in case it happens again, but all credits to your help !
Then I had to :
stop the server : systemctl stop nginx
change groups : chown -R nextcloud /hdd/nextcloud_data
change permissions otherwise no possibility to access from nautilus sftp : chmod 775 -R /hdd/nextcloud_data
check that the nano file /var/www/nextcloud/config/config.php contains the changes indicated in the tutorial (this was the case for me)
restart the server : systemctl start nginx
add a space to make a new file in nano /hdd/nextcloud_data/nextcloud/data/.ocdata
restart a scan cd /var/www/nextcloud && sudo -u nextcloud php8.1 --define apc.enable_cli=1 /var/www/nextcloud/occ files:scan --all
CAUSE OF MY PROBLEM I forgot to do at the time, update the Yunohost settings so that future upgrades know where to make and retrieve backups: yunohost app setting nextcloud datadir -v /hdd/nextcloud_data/nextcloud/data/
change groups again (because previous command reset it) : chown -R nextcloud /hdd/nextcloud_data
It looks like really long but if you follow the above list, you can see that many times the permission & groups commands are repeated due to many steps resetting them.
I identified a new issue. I said above that I had many times to reset permissions and groups : actually, every X minutes, permissions and groups are reset and I can’t access from File browser (nautilus with SFTP) anymore. Workaround is to reset permissions every X minutes, which I fear could cause conflicts and issues. I really need to find a long term solution.
Do you know what would cause this ? and if necessary which log can I share ?