What app is this about, and its version: Nextcloud (nextcloud) de 32.0.6~ynh2 What YunoHost version are you running: 12.1.39 (stable) What type of hardware are you using: Other ARM board
Describe your issue
I try to upgrade NC from 32.0.6-ynh2 to 33.0.1~ynh1.
And I get :
YunoHost a rencontré une erreur interne
Vraiment désolé de cela.
Vous devez chercher de l’aide sur le forum ou le chat pour corriger la situation,
ou signaler le bug sur le bugtracker.
Les informations suivantes peuvent être utiles à la personne qui vous aide:
Aborting the upgrade, because a safety backup could not be created (Échec
de la collecte des fichiers à sauvegarder)
Pendant le traitement de l’action, le serveur a dit:
Collecte des fichiers devant être sauvegardés pour 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
Échec de la collecte des fichiers à sauvegarder pour nextcloud.
I looked back further & the original upgrade failed… the retry gives the can’t create backup error.
The original error is around installing php8.4 libraries, see log. Looks like it can’t find the packages in the apt repo. I can see php84.-* packages, but there’s no hyphen (-) in the package names in the upgrade script. Maybe that’s the issue.
I did find the original pre-upgrade) backup in the /yunohost/#/backup folder, and (after uninstalling the app) I was able to restore the previous version. Don’t know if that’s helpful @eeaiou ?
Same problem here “yunohost backup create --apps nextcloud --debug“:
3710 WARNING File or folder ‘/etc/php/8.3/fpm/pool.d/nextcloud.conf’ to be backed up does not exist 3712 DEBUG + ynh_exit_properly 3713 DEBUG + local exit_code=1 3714 DEBUG + [[ backup =~ ^install$|^upgrade$|^restore$ ]] 3715 DEBUG + ‘[’ 1 -eq 0 ‘]’ 3716 DEBUG + trap ‘’ EXIT 3717 DEBUG + set +o errexit 3718 DEBUG + set +o nounset 3719 DEBUG + sleep 0.5 4192 DEBUG + exit 1 4296 DEBUG Could not run script: /var/cache/yunohost/app_tmp_work_dirs/app_2n29uvtb/scripts/backup 4307 ERROR Failed to collect files to backed up for nextcloud. 4321 INFO The operation ‘Create a backup archive’ could not be completed. Please share the full log of this operation using the command ‘yunohost log share 20260330-162458-backup_create’ to get help 4346 DEBUG action executed in 3.702s 4347 DEBUG lock has been released 4348 ERROR Failed to collect files to be backed up
@RaggedStaff@dontcallmehorst@grigri007@eeaiou
Did you check if the sury repo signing key is up to date ?
Do yunohost tools update and sudo apt update return errors related to a signature verification?
If so, see
Hi,
On my side I was able to solve the problem in the following way:
1 - Remove Nextcloud and restore the backup pre-upgrade as indicated in other posts above
2 - Install php packages that appear failed in the logs: sudo apt update; sudo apt install php8.4-common php8.4-opcache php8.4-readline php8.4-cli php8.4-phpdbg php8.4-fpm php8.4 php8.4-bcmath php8.4-bz2 php8.4-curl php8.4-gd php8.4-gmp php8.4-intl php8.4-ldap php8.4-mbstring php8.4-mysql php8.4-sqlite3 php8.4-xml php8.4-zip
3 - redo nextcloud update
And that’s it. I think it’s related to the fact that the update script is trying to install the 8.4.17 packages, while the repository contains the 8.4.18 packages. I leave it to people more competent than me to validate or not this method.
[FR]
Salut,
De mon coté j’ai pu résoudre le problème de la manière suivante :
1 - Suppression de Nextcloud et restauration du backup pre-upgrade comme indiqué dans d’autres posts ci-dessus
2 - instalation des paquets php qui apparaissent en échec dans les logs : sudo apt update ; sudo apt install php8.4-common php8.4-opcache php8.4-readline php8.4-cli php8.4-phpdbg php8.4-fpm php8.4 php8.4-bcmath php8.4-bz2 php8.4-curl php8.4-gd php8.4-gmp php8.4-intl php8.4-ldap php8.4-mbstring php8.4-mysql php8.4-sqlite3 php8.4-xml php8.4-zip
3 - refaire la mise à jour de nextcloud
Et c’est tout. Je pense que c’est lié au fait que le script de mise à jour cherche à installer les paquets en versions 8.4.17, alors que le dépot contient les paquets en version 8.4.18.
Je laisse le soin à des gens plus compétents que moi de valider ou non cette méthode.
Manually installing dependencies, will leave them installed even if they are not needed anymore (removing the app, upgrading to the next version of php). It doesn’t harm but you will have extra packages on your server at some point
Thank you for your reply. In my case, I realised that unused php versions often stay installed when they are not needed anymore, even if I do not install them manually. This is specific to php (I don’t know why), so I make some clean from time to time :
1 - I get all php versions that are used by installed apps. lsof | grep /var/run/php | awk ‘{print $9}’ | sort -u | cut -d’/’ -f5 | awk -F’-’ ‘{print $1,$3}’ | cut -d’.’ -f1,2
2 - Then I get all php versions installed. apt list php* --installed
3 - If I see some unused versions, I remove them, for exemple : sudo apt remove php8.3*
E: Failed to fetch https://packages.sury.org/php/pool/main/p/php-igbinary/php8.3-igbinary_3.2.16-6%2B0~20251124.56%2Bdebian12~1.gbp1eff65_amd64.deb 404 Not Found [IP: 2a04:4e42:8e::820 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
The following packages have unmet dependencies:
php8.3-imap : Depends: libc-client2007e but it is not going to be installed
smbclient : Depends: samba-common (= 2:4.17.12+dfsg-0+deb12u3) but it is not going to be installed
Unable to install apt dependencies, it might be due to a conflict with another app - or you should check and share the previous log about what are the problematic dependencies
provision_or_update failed for apt : An error occured inside the script snippet : Unable to install apt dependencies, it might be due to a conflict with another app - or you should check and share the previous log about what are the problematic dependencies
After having uninstalled Nextcloud, it still showed as installed though when opening the link it would redirect me back to the Portal. I couldn’t do the pre-upgrade saying I already had Nextcloud installed and couldn’t install a new instance either. I fixed the errors below first.
When running update I was getting two GPG key errors.
Sury.org I fixed it running sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B188E2B695BD4743
Then the Yarn key, I ran curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
and went to /etc/apt/sources.list.d/yarn.list and update the line there with this one /etc/apt/sources.list.d/yarn.list
Now went back to Yunohost admin and check the update, I got 90 new packages to be installed. I ran those. Now I went to uninstall Nextcloud again, which according to the logs failed but it had actually been uninstalled this second time. Then the pre-upgrade was successful.
The following worked for me in YunoHost 13.0.4, even though I was a bit worried to remove the app because I thought it would imply deleting the data, too. Good to know!