YunoHost-Apps / nextcloud_ynh

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

unable to upgrade to olstable branch #668

Closed rodinux closed 7 months ago

rodinux commented 7 months ago

Describe the bug

upgrade from oldstable branch failed

Context

Steps to reproduce

  sudo yunohost app upgrade nextcloud -u https://github.com/YunoHost-Apps/nextcloud_ynh/tree/oldstable --debug

The upgrade failed

Expected behavior

An upgrade of nextcloud package to version 1.2.6

Logs

here logs of the first try

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

It always finish with

2024-02-26 20:49:31,773: DEBUG - ++ app=nextcloud
2024-02-26 20:49:31,773: DEBUG - ++ [[ do_not_backup_data =~ (unprotected|protected|skipped)_ ]]
2024-02-26 20:49:31,773: DEBUG - ++ ynh_app_setting get nextcloud do_not_backup_data
2024-02-26 20:49:31,828: DEBUG - + do_not_backup_data=
2024-02-26 20:49:31,829: DEBUG - + '[' '!' -e '' ']'
2024-02-26 20:49:31,829: DEBUG - + ynh_print_warn '--message=Source path '\'''\'' does not exist'
2024-02-26 20:49:31,838: DEBUG - + ynh_print_log 'Source path '\'''\'' does not exist'
2024-02-26 20:49:31,838: DEBUG - + echo -e 'Source path '\'''\'' does not exist'
2024-02-26 20:49:31,839: DEBUG - + '[' 0 == 0 ']'
2024-02-26 20:49:31,845: WARNING - Source path '' does not exist
2024-02-26 20:49:31,846: DEBUG - + grep --quiet /etc/fail2ban
2024-02-26 20:49:31,846: DEBUG - + return 1
2024-02-26 20:49:31,847: DEBUG - + ynh_exit_properly
2024-02-26 20:49:31,847: DEBUG - + [[ backup =~ ^install$|^upgrade$|^restore$ ]]
2024-02-26 20:49:33,346: DEBUG - Could not run script: /var/cache/yunohost/app_tmp_work_dirs/app_l3g3cv2k/scripts/backup
2024-02-26 20:49:33,352: ERROR - Could not back up nextcloud

I could not found the directory /var/cache/yunohost/app_tmp_work_dirs/app_l3g3cv2k/ after this operation but others directories in /var/cache/yunohost/app_tmp_work_dirs/.

I have also try remove them before rm -r /var/cache/yunohost/app_tmp_work_dirs/*, but it did not resolve... It seems the correct path in /var/cache/yunohost/app_tmp_work_dirs/ is not found or not correctly named ??

rodinux commented 7 months ago

The issue is not related to the package.

nwallace commented 6 months ago

The issue is not related to the package.

Can you explain what it was related to? I'm having a similar issue I can't figure out.

rodinux commented 6 months ago

Ok, it was old configs from older settings versions for final_path and/or datadir

I have first try

yunohost app setting nextcloud datadir -v "/home/yunohost.app/nextcloud/data"

and then this, (was the solution for me)

yunohost app setting nextcloud final_path -v /var/www/nextcloud

see in this topic

https://forum.yunohost.org/t/source-path-does-not-exist-cant-backup-or-upgrade/28735/4?u=rodinux

zyphlar commented 6 months ago

For future travelers: in addition to the final_path setting above, I also had to cp /etc/php/7.3/fpm/pool.d/nextcloud.conf /etc/php/8.2/fpm/pool.d/ since the backup script thought I had a nextcloud.conf file there