Impossible de mettre à jour nextcloud

Bonjour,

Quand j’essaye via l’interface web, ça tourne en boucle sans qu’il ne se passe quoi que ce soit.

Quand j’essaye via la console, j’ai ça:

Warning: Upgrading app nextcloud...
Warning: The output directory is not empty
Warning: Backup failed, the upgrade process was aborted.
Error: Unable to upgrade nextcloud

Please show the complete log from this command:

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

Voilà.

root@stemy:~# yunohost app upgrade -u https://github.com/YunoHost-Apps/nextcloud_ynh nextcloud --debug442  DEBUG loading actions map namespace 'yunohost'
570  DEBUG extra parameter classes loaded: ['ask', 'password', 'required', 'pattern']
573  DEBUG initializing base actions map parser for cli
583  DEBUG registering new callback action 'yunohost.utils.packages.ynh_packages_version' to ['-v', '--version']
1227 DEBUG initialize authenticator 'ldap-anonymous' with: uri='ldap://localhost:389', base_dn='dc=yunohost,dc=org', user_rdn='None'
1250 DEBUG lock has been acquired
1421 DEBUG loading python module yunohost.app took 0.170s
1423 INFO processing action [28275.1]: yunohost.app.upgrade with args={'url': 'https://github.com/YunoHost-Apps/nextcloud_ynh', 'app': ['nextcloud'], 'auth': <moulinette.authenticators.ldap.Authenticator object at 0xb6603770>, 'file': None}
2256 INFO Upgrading apps nextcloud
2259 WARNING Upgrading app nextcloud...
2326 INFO Downloading...
3827 INFO Extracting...
3888 INFO Done
5034 INFO Checking required packages for nextcloud...
7939 DEBUG no arguments found for 'upgrade' in manifest
7992 INFO Executing command 'sh -c YNH_APP_INSTANCE_NUMBER=1 YNH_APP_ID=nextcloud YNH_CWD=/var/cache/yunohost/from_file/nextcloud_ynh-master/scripts YNH_APP_INSTANCE_NAME=nextcloud BASH_XTRACEFD=7 /bin/bash -x "./upgrade" nextcloud 7>&1'...
8053 INFO + source _common.sh
8059 INFO ++ pkg_dependencies='php5-gd php5-json php5-intl php5-mcrypt php5-curl php5-apcu php5-redis php5-ldap php5-imagick imagemagick acl tar smbclient'
8064 INFO +++ lsb_release --codename --short
8261 INFO ++ '[' jessie '!=' jessie ']'
8274 INFO + source /usr/share/yunohost/helpers
8279 INFO +++ run-parts --list /usr/share/yunohost/helpers.d
8290 INFO ++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
8291 INFO ++ '[' -r /usr/share/yunohost/helpers.d/backend ']'
8293 INFO ++ . /usr/share/yunohost/helpers.d/backend
8302 INFO ++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
8305 INFO ++ '[' -r /usr/share/yunohost/helpers.d/filesystem ']'
8308 INFO ++ . /usr/share/yunohost/helpers.d/filesystem
8310 INFO +++ CAN_BIND=1
8320 INFO ++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
8323 INFO ++ '[' -r /usr/share/yunohost/helpers.d/ip ']'
8326 INFO ++ . /usr/share/yunohost/helpers.d/ip
8329 INFO ++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
8331 INFO ++ '[' -r /usr/share/yunohost/helpers.d/mysql ']'
8334 INFO ++ . /usr/share/yunohost/helpers.d/mysql
8337 INFO +++ MYSQL_ROOT_PWD_FILE=/etc/yunohost/mysql
8341 INFO ++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
8344 INFO ++ '[' -r /usr/share/yunohost/helpers.d/network ']'
8346 INFO ++ . /usr/share/yunohost/helpers.d/network
8348 INFO ++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
8350 INFO ++ '[' -r /usr/share/yunohost/helpers.d/nodejs ']'
8353 INFO ++ . /usr/share/yunohost/helpers.d/nodejs
8356 INFO +++ n_install_dir=/opt/node_n
8357 INFO +++ node_version_path=/opt/node_n/n/versions/node
8360 INFO +++ export N_PREFIX=/opt/node_n
8364 INFO +++ N_PREFIX=/opt/node_n
8367 INFO ++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
8370 INFO ++ '[' -r /usr/share/yunohost/helpers.d/package ']'
8372 INFO ++ . /usr/share/yunohost/helpers.d/package
8378 INFO ++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
8380 INFO ++ '[' -r /usr/share/yunohost/helpers.d/print ']'
8383 INFO ++ . /usr/share/yunohost/helpers.d/print
8386 INFO ++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
8388 INFO ++ '[' -r /usr/share/yunohost/helpers.d/psql ']'
8391 INFO ++ . /usr/share/yunohost/helpers.d/psql
8393 INFO ++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
8396 INFO ++ '[' -r /usr/share/yunohost/helpers.d/setting ']'
8399 INFO ++ . /usr/share/yunohost/helpers.d/setting
8401 INFO ++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
8404 INFO ++ '[' -r /usr/share/yunohost/helpers.d/string ']'
8407 INFO ++ . /usr/share/yunohost/helpers.d/string
8409 INFO ++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
8412 INFO ++ '[' -r /usr/share/yunohost/helpers.d/system ']'
8414 INFO ++ . /usr/share/yunohost/helpers.d/system
8417 INFO ++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
8419 INFO ++ '[' -r /usr/share/yunohost/helpers.d/user ']'
8421 INFO ++ . /usr/share/yunohost/helpers.d/user
8424 INFO ++ for helper in '$(run-parts --list /usr/share/yunohost/helpers.d 2>/dev/null)'
8427 INFO ++ '[' -r /usr/share/yunohost/helpers.d/utils ']'
8429 INFO ++ . /usr/share/yunohost/helpers.d/utils
8433 INFO + app=nextcloud
8435 INFO ++ ynh_app_setting_get nextcloud domain
8438 INFO ++ sudo yunohost app setting nextcloud domain --output-as plain --quiet
10079 INFO + domain=stemy.me
10083 INFO ++ ynh_app_setting_get nextcloud path
10086 INFO ++ sudo yunohost app setting nextcloud path --output-as plain --quiet
11716 INFO + path_url=/nextcloud
11719 INFO ++ ynh_app_setting_get nextcloud admin
11723 INFO ++ sudo yunohost app setting nextcloud admin --output-as plain --quiet
13340 INFO + admin=pierre
13348 INFO ++ ynh_app_setting_get nextcloud final_path
13351 INFO ++ sudo yunohost app setting nextcloud final_path --output-as plain --quiet
14959 INFO + final_path=/var/www/nextcloud
14961 INFO ++ ynh_app_setting_get nextcloud db_name
14967 INFO ++ sudo yunohost app setting nextcloud db_name --output-as plain --quiet
16888 INFO + db_name=nextcloud
16890 INFO ++ ynh_app_setting_get nextcloud user_home
16893 INFO ++ sudo yunohost app setting nextcloud user_home --output-as plain --quiet
18526 INFO + user_home=1
18528 INFO + '[' -z nextcloud ']'
18530 INFO + '[' -z /var/www/nextcloud ']'
18533 INFO ++ cut '-d'\''' -f2
18541 INFO ++ grep OC_VersionString /var/www/nextcloud/version.php
18557 INFO + current_version=13.0.1
18559 INFO + current_major_version=13
18561 INFO + '[' 13 -gt 11 ']'
18564 INFO + ynh_app_setting_set nextcloud backup_core_only 1
18572 INFO + sudo yunohost app setting nextcloud backup_core_only --value=1 --quiet
20203 INFO + ynh_backup_before_upgrade
20204 INFO + '[' '!' -e /etc/yunohost/apps/nextcloud/scripts/backup ']'
20208 INFO + backup_number=1
20212 INFO + local old_backup_number=2
20216 INFO + local app_bck=nextcloud
20219 INFO + NO_BACKUP_UPGRADE=0
20226 INFO + '[' 0 -eq 0 ']'
20229 INFO + sudo yunohost backup list
20231 INFO + grep -q nextcloud-pre-upgrade1
22025 INFO + sudo BACKUP_CORE_ONLY=1 yunohost backup create --ignore-system --apps nextcloud --name nextcloud-pre-upgrade1 --verbose
23746 WARNING The output directory is not empty
23866 INFO + '[' 5 -eq 0 ']'
23868 INFO + ynh_die 'Backup failed, the upgrade process was aborted.'
23869 INFO + echo 'Backup failed, the upgrade process was aborted.'
23871 INFO + exit 1
23873 WARNING Backup failed, the upgrade process was aborted.
23935 ERROR Unable to upgrade nextcloud
23937 DEBUG action [28275.1] executed in 22.513s
23939 DEBUG lock has been released
23941 ERROR No app to upgrade
root@stemy:~#

OK problème déjà vu quelque part.

Le script d’upgrade cherche automatiquement à effectuer une sauvegarde avant la mise à jour. Or un résidu de sauvegarde est déjà présent avec le même nom ce qui fait échouer toute l’opération.

Cette sauvegarde se nomme nextcloud-pre-upgrade1. Supprime-la puis relance la mise à jour.

Ok, je dois taper quelle commande pour ça ?

Je crois que tu peux faire ça depuis l’interface d’admin mais en ligne de commande ce serait comme ça :

sudo yunohost backup delete nextcloud-pre-upgrade1

Ça ne marche pas.

Error: Unknown local backup archive named 'nextcloud-pre-upgrade1'

you should rename the nextcloud-pre-upgrade1.

It would be under /home/yunohost.backup/archives.

cd  /home/yunohost.backup/archives
mv nextcloud-pre-upgrade1.tar.gz nextcloud-pre-upgrade1-backup.tar.gz 
mv nextcloud-pre-upgrade1.info.json nextcloud-pre-upgrade1-backup.info.json
1 Like