Mise à jour de nextcloud cassé : comment récupérer?

What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.0.11
What app is this about: Nextcloud

Describe your issue

J’ai lancé la mise à jour de nextcloud via le web,
ET j’ai oublié que c’était en cours … j’ai fermé le navigateur.

Je me connecte donc en CLI,

# yunohost tools update
Info: Fetching available upgrades for system packages…
Info: Updating application catalog…
Success! The application catalog has been updated!
apps: 
  current_version: 29.0.9~ynh1
  description: Online storage, file sharing platform and various other applications
  domain_path: maison.shnoulle.net/owncloud
  id: nextcloud
  logo: 7619f283fa6ce9e0c6ae30cef5bb7cb47b926e9abccda4009a70e54579aa915a
  name: Nextcloud
  new_version: 30.0.4~ynh2
  notifications: 
    PRE_UPGRADE: 
  upgradable: yes
  version: 29.0.9~ynh1
important_yunohost_upgrade: False
pending_migrations: 
system: 

OK, lançons la mise à jour :

# yunohost tools upgrade apps
Info: Now upgrading nextcloud…
Info: Creating a safety backup prior to the upgrade
Info: Collecting files to be backed up for nextcloud…
Info: Declaring files to be backed up...
Warning: Source path '/var/www/nextcloud' does not exist
Error: Could not back up nextcloud
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 20250125-004221-backup_create' to get help
Warning: unable to upgrade apps: Nothing to save
Error: Some apps could not be upgraded

A remarquee que j’ai bien du contenu sur /home/yunohost.app/nextcloud/data/
Et la backup nextcloud-pre-upgrade1juste avant la mise à jour.

Quand via web, je tente une restauration : Les applications suivantes ne peuvent pas être restaurées car elles sont déjà installées : nextcloud
Via web : aucune application installée.

# yunohost backup restore  nextcloud-pre-upgrade1
Error: The following apps can't be restored because they are already installed: nextcloud

Quelle est la meilleure façon de revenir sur la sauvegarde ?

  1. Tenter de supprimer Nextcloud puis refaire la sauveragrde ?
  2. un --force sur la backup ?

Merci :slight_smile:

Share relevant logs or error messages

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

Donc,

Ce que j’ai fauit : désinstallation de nextcloud, reorise de la sauvegarde, et … ça c’est mal passé.

Première connexion : votre répertoire data est mal configuré : pas de fichier .ocdata, je fait donc un

cat /home/yunohost.app/nextcloud/data/.ncdata > /home/yunohost.app/nextcloud/data/.ocdata

Je recharge la page :
Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

OK, allons dans les détail
Je recommence par [Broke] Nextcloud Update to 30.0.4 : broken, backup broken too (".ocdata" file) - #9 by wbk

cat /home/yunohost.app/nextcloud/data/.ncdata > /home/yunohost.app/nextcloud/data/.ocdata
chown nextcloud:nextcloud /home/yunohost.app/nextcloud/data/.ocdata
chmod 750 nextcloud:nextcloud /home/yunohost.app/nextcloud/data/.ocdata

Mais encore un probème dans le log :
"message": "file_get_contents(/home/yunohost.app/nextcloud/data/appdata_ocxsmc2kyo1p/js/core/merged-template-prepend.js.deps): Failed to open stream: No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#331",

On va faire une maintenance complète

sudo -u nextcloud env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin php8.3 --define apc.enable_cli=1 /var/www/nextcloud/occ  maintenance:data-fingerprint
sudo -u nextcloud env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin php8.3 --define apc.enable_cli=1 /var/www/nextcloud/occ  maintenance:mimetype:update-db
sudo -u nextcloud env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin php8.3 --define apc.enable_cli=1 /var/www/nextcloud/occ  maintenance:mimetype:update-js
mimetypelist.js is updated
sudo -u nextcloud env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin php8.3 --define apc.enable_cli=1 /var/www/nextcloud/occ  maintenance:repair
sudo -u nextcloud env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin php8.3 --define apc.enable_cli=1 /var/www/nextcloud/occ maintenance:repair-share-owner
Repair these shares? [y/N]y
Repairing 3 shares
sudo -u nextcloud env PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin php8.3 --define apc.enable_cli=1 /var/www/nextcloud/occ maintenance:theme:update
2 Likes

Juste pour la récupération,
Je refais un backup et relance une mise à jour …

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.