Nextcloud Uprade is not working

What app is this about, and its version: Nextcloud 32.0.6~ynh2 to 33.0.2~ynh1
What YunoHost version are you running: 12.1.39
What type of hardware are you using: Raspberry Pi 3, 4+

Describe your issue

“500” Aktion: “PUT” /yunohost/api/apps/nextcloud/upgrade Fehlermeldung: Aborting the upgrade, because a safety backup could not be created (Failed to collect files to be backed up) Während der Verarbeitung der Aktion hat der Server gemeldet: Sammeln von Dateien, die für nextcloud gesichert werden sollen… 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 Failed to collect files to backed up for nextcloud.

Share relevant logs or error messages

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

args:
apps:

  • nextcloud
    name: nextcloud-pre-upgrade1
    system: null
    ended_at: 2026-04-11 15:52:08.319828
    error: Failed to collect files to be backed up
    interface: cli
    operation: backup_create
    parent: null
    related_to:
    • app
    • nextcloud
      started_at: 2026-04-11 15:52:05.799408
      started_by: ******
      success: false
      yunohost_version: 12.1.39

============

2026-04-11 16:52:06,972: INFO - Collecting files to be backed up for nextcloud…
2026-04-11 16:52:07,016: DEBUG - Executing command ‘[‘sh’, ‘-c’, ‘/bin/bash -x “/var/cache/yunohost/app_tmp_work_dirs/app_7pso2akm/scripts/backup” 7>&1’]’
2026-04-11 16:52:07,029: DEBUG - + source ../settings/scripts/_common.sh
2026-04-11 16:52:07,030: DEBUG - + source /usr/share/yunohost/helpers
2026-04-11 16:52:07,032: DEBUG - ++++ dirname – /usr/share/yunohost/helpers
2026-04-11 16:52:07,034: DEBUG - +++ cd – /usr/share/yunohost
2026-04-11 16:52:07,035: DEBUG - +++ pwd
2026-04-11 16:52:07,035: DEBUG - ++ SCRIPT_DIR=/usr/share/yunohost
2026-04-11 16:52:07,035: DEBUG - ++ YNH_HELPERS_VERSION=2.1
2026-04-11 16:52:07,041: DEBUG - ++ readonly ‘XTRACE_ENABLE=set -o xtrace’
2026-04-11 16:52:07,042: DEBUG - ++ XTRACE_ENABLE=‘set -o xtrace’
2026-04-11 16:52:07,073: DEBUG - + ynh_print_info ‘Declaring files to be backed up…’
2026-04-11 16:52:07,074: DEBUG - + ynh_backup /var/www/nextcloud
2026-04-11 16:52:07,075: DEBUG - + local target=/var/www/nextcloud
2026-04-11 16:52:07,075: DEBUG - + local is_data=false
2026-04-11 16:52:07,075: DEBUG - + [[ -n nextcloud ]]
2026-04-11 16:52:07,075: DEBUG - + [[ /var/www/nextcloud =~ ^/var/log/nextcloud/?*?$ ]]
2026-04-11 16:52:07,075: DEBUG - + [[ -n /home/yunohost.app/nextcloud ]]
2026-04-11 16:52:07,076: DEBUG - + [[ /var/www/nextcloud =~ ^/home/yunohost.app/nextcloud ]]
2026-04-11 16:52:07,076: DEBUG - + [[ -n nextcloud ]]
2026-04-11 16:52:07,076: INFO - Declaring files to be backed up…
2026-04-11 16:52:07,077: DEBUG - ++ ynh_app_setting_get --key=do_not_backup_data
2026-04-11 16:52:07,284: DEBUG - + local do_not_backup_data=
2026-04-11 16:52:07,284: DEBUG - + [[ false == true ]]
2026-04-11 16:52:07,284: DEBUG - + ‘[’ ‘!’ -e /var/www/nextcloud ‘]’
2026-04-11 16:52:07,285: DEBUG - ++ realpath /var/www/nextcloud
2026-04-11 16:52:07,288: DEBUG - + src_path=/var/www/nextcloud
2026-04-11 16:52:07,288: DEBUG - + dest_path=var/www/nextcloud
2026-04-11 16:52:07,289: DEBUG - + [[ -e var/www/nextcloud ]]
2026-04-11 16:52:07,289: DEBUG - + local rel_dir=/apps/nextcloud/backup
2026-04-11 16:52:07,289: DEBUG - + rel_dir=/apps/nextcloud/backup/
2026-04-11 16:52:07,289: DEBUG - + dest_path=/apps/nextcloud/backup/var/www/nextcloud
2026-04-11 16:52:07,289: DEBUG - + dest_path=apps/nextcloud/backup/var/www/nextcloud
2026-04-11 16:52:07,290: DEBUG - ++ echo /var/www/nextcloud
2026-04-11 16:52:07,291: DEBUG - ++ sed --regexp-extended ‘s/"/""/g’
2026-04-11 16:52:07,297: DEBUG - + local src=/var/www/nextcloud
2026-04-11 16:52:07,299: DEBUG - ++ echo apps/nextcloud/backup/var/www/nextcloud
2026-04-11 16:52:07,300: DEBUG - ++ sed --regexp-extended ‘s/"/""/g’
2026-04-11 16:52:07,305: DEBUG - + local dest=apps/nextcloud/backup/var/www/nextcloud
2026-04-11 16:52:07,306: DEBUG - ++ dirname /home/yunohost.backup/tmp/nextcloud-pre-upgrade1/apps/nextcloud/backup/var/www/nextcloud
2026-04-11 16:52:07,309: DEBUG - + mkdir --parents /home/yunohost.backup/tmp/nextcloud-pre-upgrade1/apps/nextcloud/backup/var/www
2026-04-11 16:52:07,314: DEBUG - + ynh_backup /home/yunohost.app/nextcloud
2026-04-11 16:52:07,315: DEBUG - + local target=/home/yunohost.app/nextcloud
2026-04-11 16:52:07,315: DEBUG - + local is_data=false
2026-04-11 16:52:07,315: DEBUG - + [[ -n nextcloud ]]
2026-04-11 16:52:07,315: DEBUG - + [[ /home/yunohost.app/nextcloud =~ ^/var/log/nextcloud/?*?$ ]]
2026-04-11 16:52:07,315: DEBUG - + [[ -n /home/yunohost.app/nextcloud ]]
2026-04-11 16:52:07,316: DEBUG - + [[ /home/yunohost.app/nextcloud =~ ^/home/yunohost.app/nextcloud ]]
2026-04-11 16:52:07,316: DEBUG - + is_data=true
2026-04-11 16:52:07,316: DEBUG - + [[ -n nextcloud ]]
2026-04-11 16:52:07,316: DEBUG - ++ ynh_app_setting_get --key=do_not_backup_data
2026-04-11 16:52:07,509: DEBUG - + local do_not_backup_data=
2026-04-11 16:52:07,510: DEBUG - + [[ true == true ]]
2026-04-11 16:52:07,510: DEBUG - + [[ 0 -eq 1 ]]
2026-04-11 16:52:07,510: DEBUG - + [[ 1 -eq 1 ]]
2026-04-11 16:52:07,511: DEBUG - + ynh_print_info ‘/home/yunohost.app/nextcloud will not be saved, because ‘'‘BACKUP_CORE_ONLY’'’ is set.’
2026-04-11 16:52:07,511: DEBUG - + return 0
2026-04-11 16:52:07,512: INFO - /home/yunohost.app/nextcloud will not be saved, because ‘BACKUP_CORE_ONLY’ is set.
2026-04-11 16:52:07,513: DEBUG - + ynh_backup /etc/php/8.3/fpm/pool.d/nextcloud.conf
2026-04-11 16:52:07,513: DEBUG - + local target=/etc/php/8.3/fpm/pool.d/nextcloud.conf
2026-04-11 16:52:07,514: DEBUG - + local is_data=false
2026-04-11 16:52:07,514: DEBUG - + [[ -n nextcloud ]]
2026-04-11 16:52:07,514: DEBUG - + [[ /etc/php/8.3/fpm/pool.d/nextcloud.conf =~ ^/var/log/nextcloud/?*?$ ]]
2026-04-11 16:52:07,514: DEBUG - + [[ -n /home/yunohost.app/nextcloud ]]
2026-04-11 16:52:07,514: DEBUG - + [[ /etc/php/8.3/fpm/pool.d/nextcloud.conf =~ ^/home/yunohost.app/nextcloud ]]
2026-04-11 16:52:07,515: DEBUG - + [[ -n nextcloud ]]
2026-04-11 16:52:07,515: DEBUG - ++ ynh_app_setting_get --key=do_not_backup_data
2026-04-11 16:52:07,704: DEBUG - + local do_not_backup_data=
2026-04-11 16:52:07,705: DEBUG - + [[ false == true ]]
2026-04-11 16:52:07,705: DEBUG - + ‘[’ ‘!’ -e /etc/php/8.3/fpm/pool.d/nextcloud.conf ‘]’
2026-04-11 16:52:07,705: DEBUG - + ynh_print_warn ‘File or folder ‘'’/etc/php/8.3/fpm/pool.d/nextcloud.conf’'’ to be backed up does not exist’
2026-04-11 16:52:07,706: DEBUG - + return 1
2026-04-11 16:52:07,713: WARNING - File or folder ‘/etc/php/8.3/fpm/pool.d/nextcloud.conf’ to be backed up does not exist
2026-04-11 16:52:07,714: DEBUG - + ynh_exit_properly
2026-04-11 16:52:07,714: DEBUG - + [[ backup =~ ^install$|^upgrade$|^restore$ ]]
2026-04-11 16:52:08,310: DEBUG - Could not run script: /var/cache/yunohost/app_tmp_work_dirs/app_7pso2akm/scripts/backup
2026-04-11 16:52:08,315: ERROR - Failed to collect files to backed up for nextcloud.

  1. First, can 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 : Yarn and Sury APT keys issues

  2. Then check if the extra apps you installed are up to date and compatible with the latest nextcloud release : https://apps.nextcloud.com/apps/maps Just replace maps with the name of the app you want to check.
    If there are not yet compatible, disable (or as a last resort remove them) :

yunohost app shell nextcloud
php occ app:disable appname # or php occ app:remove appname
  1. two ways for this step
    a) upgrade without creating a backup : yunohost app upgrade nextcloud -b
    b) create the missing php conf file : nano /etc/php/8.3/fpm/pool.d/nextcloud.conf with the following content :
[nextcloud]

user = nextcloud
group = nextcloud

chdir = /var/www/nextcloud

listen = /var/run/php/php8.3-fpm-nextcloud.sock
listen.owner = www-data
listen.group = www-data

pm = ondemand
pm.max_children = 16
pm.max_requests = 500
request_terminate_timeout = 1d

pm.process_idle_timeout = 10s
php_admin_value[upload_max_filesize] = 10G
php_admin_value[post_max_size] = 10G
php_admin_value[memory_limit] = 512M

; Additional php.ini defines, specific to this pool of workers.
env[PATH] = $PATH
env[LANG] = $LANG
env[LC_ALL] = $LANG
php_value[default_charset] = UTF-8
; OPcache is already activated by default
; php_value[opcache.enable]=1
; The following parameters are nevertheless recommended for Nextcloud
; see here: https://docs.nextcloud.com/server/20/admin_manual/installation/server_tuning.html#enable-php-opcache
php_value[opcache.enable_cli]=1
php_value[opcache.interned_strings_buffer]=32
php_value[opcache.max_accelerated_files]=10000
php_value[opcache.memory_consumption]=128
php_value[opcache.save_comments]=1
php_value[opcache.revalidate_freq]=60
; https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html#configuring-php
php_value[output_buffering]=0
; https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html#id1
php_value[apc.enabled]=1
php_value[apc.enable_cli]=1

The run the upgrade.

3 Likes

paste.yunohost.org/raw/isamifuvub

Now its all working, Thank You

The solution at my case was

sudo rm /etc/apt/trusted.gpg.d/{yarn,extra_php_version}.gpg
sudo yunohost tools regen-conf apt
sudo apt update

sudo yunohost app upgrade nextcloud -b

2 Likes

Hi there,

Just wanted to send some thanks to you @otm33 for all the good instructions ! I did encounter the problem and the instructions did the trick (yarn/sury APT repos GPG keys update + upgrading nextcloud skipping the backup which had just been done).

I will research a bit more on nextcloud itself as it seemed strange to me the upgrade did not work yet the old nextcloud would not be running. I did not know how to just restart nextcloud in this case.

Thanks again!

1 Like

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