Castopod does not update - Failed to collect files to backed up for castopod

What app is this about, and its version: castopod 1.15.1~ynh1
What YunoHost version are you running: YunoHost 12.1.39
What type of hardware are you using: VPS bought online

Describe your issue

I want to update castopod from 1.15.1~ynh1 to 1.15.4~ynh1 but i get an error - see below. What can i do? I had a look at ‘/etc/php/8.2/fpm/pool.d/’ and there is no castopod.conf in that directory.

Share relevant logs or error messages

args:
  apps:
  - castopod
  name: castopod-pre-upgrade2
  system: null
ended_at: 2026-03-03 13:06:03.648282
error: Failed to collect files to be backed up
interface: api
operation: backup_create
parent: null
related_to:
- - app
  - castopod
started_at: 2026-03-03 13:06:01.521757
started_by: ******
success: false
yunohost_version: 12.1.39

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

2026-03-03 14:06:02,572: INFO - Sammeln von Dateien, die für castopod gesichert werden sollen…
2026-03-03 14:06:02,583: DEBUG - Executing command '['sh', '-c', '/bin/bash -x "/var/cache/yunohost/app_tmp_work_dirs/app_fuqe916k/scripts/backup"  7>&1']'
2026-03-03 14:06:02,607: DEBUG - + source /usr/share/yunohost/helpers
2026-03-03 14:06:02,609: DEBUG - ++++ dirname -- /usr/share/yunohost/helpers
2026-03-03 14:06:02,610: DEBUG - +++ cd -- /usr/share/yunohost
2026-03-03 14:06:02,611: DEBUG - +++ pwd
2026-03-03 14:06:02,611: DEBUG - ++ SCRIPT_DIR=/usr/share/yunohost
2026-03-03 14:06:02,611: DEBUG - ++ YNH_HELPERS_VERSION=2.1
2026-03-03 14:06:02,614: DEBUG - ++ readonly 'XTRACE_ENABLE=set -o xtrace'
2026-03-03 14:06:02,614: DEBUG - ++ XTRACE_ENABLE='set -o xtrace'
2026-03-03 14:06:02,627: DEBUG - + ynh_print_info 'Declaring files to be backed up...'
2026-03-03 14:06:02,627: INFO - Declaring files to be backed up...
2026-03-03 14:06:02,629: DEBUG - + ynh_backup /var/www/castopod
2026-03-03 14:06:02,629: DEBUG - + local target=/var/www/castopod
2026-03-03 14:06:02,629: DEBUG - + local is_data=false
2026-03-03 14:06:02,630: DEBUG - + [[ -n castopod ]]
2026-03-03 14:06:02,630: DEBUG - + [[ /var/www/castopod =~ ^/var/log/castopod/?\*?$ ]]
2026-03-03 14:06:02,630: DEBUG - + [[ -n /home/yunohost.app/castopod ]]
2026-03-03 14:06:02,630: DEBUG - + [[ /var/www/castopod =~ ^/home/yunohost.app/castopod ]]
2026-03-03 14:06:02,631: DEBUG - + [[ -n castopod ]]
2026-03-03 14:06:02,631: DEBUG - ++ ynh_app_setting_get --key=do_not_backup_data
2026-03-03 14:06:02,705: DEBUG - + local do_not_backup_data=
2026-03-03 14:06:02,705: DEBUG - + [[ false == true ]]
2026-03-03 14:06:02,706: DEBUG - + '[' '!' -e /var/www/castopod ']'
2026-03-03 14:06:02,706: DEBUG - ++ realpath /var/www/castopod
2026-03-03 14:06:02,707: DEBUG - + src_path=/var/www/castopod
2026-03-03 14:06:02,707: DEBUG - + dest_path=var/www/castopod
2026-03-03 14:06:02,708: DEBUG - + [[ -e var/www/castopod ]]
2026-03-03 14:06:02,708: DEBUG - + local rel_dir=/apps/castopod/backup
2026-03-03 14:06:02,708: DEBUG - + rel_dir=/apps/castopod/backup/
2026-03-03 14:06:02,709: DEBUG - + dest_path=/apps/castopod/backup/var/www/castopod
2026-03-03 14:06:02,709: DEBUG - + dest_path=apps/castopod/backup/var/www/castopod
2026-03-03 14:06:02,709: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g'
2026-03-03 14:06:02,710: DEBUG - ++ echo /var/www/castopod
2026-03-03 14:06:02,713: DEBUG - + local src=/var/www/castopod
2026-03-03 14:06:02,714: DEBUG - ++ echo apps/castopod/backup/var/www/castopod
2026-03-03 14:06:02,714: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g'
2026-03-03 14:06:02,718: DEBUG - + local dest=apps/castopod/backup/var/www/castopod
2026-03-03 14:06:02,718: DEBUG - ++ dirname /home/yunohost.backup/tmp/castopod-pre-upgrade2/apps/castopod/backup/var/www/castopod
2026-03-03 14:06:02,720: DEBUG - + mkdir --parents /home/yunohost.backup/tmp/castopod-pre-upgrade2/apps/castopod/backup/var/www
2026-03-03 14:06:02,724: DEBUG - + ynh_backup /home/yunohost.app/castopod
2026-03-03 14:06:02,724: DEBUG - + local target=/home/yunohost.app/castopod
2026-03-03 14:06:02,724: DEBUG - + local is_data=false
2026-03-03 14:06:02,725: DEBUG - + [[ -n castopod ]]
2026-03-03 14:06:02,725: DEBUG - + [[ /home/yunohost.app/castopod =~ ^/var/log/castopod/?\*?$ ]]
2026-03-03 14:06:02,725: DEBUG - + [[ -n /home/yunohost.app/castopod ]]
2026-03-03 14:06:02,726: DEBUG - + [[ /home/yunohost.app/castopod =~ ^/home/yunohost.app/castopod ]]
2026-03-03 14:06:02,726: DEBUG - + is_data=true
2026-03-03 14:06:02,726: DEBUG - + [[ -n castopod ]]
2026-03-03 14:06:02,726: DEBUG - ++ ynh_app_setting_get --key=do_not_backup_data
2026-03-03 14:06:02,813: DEBUG - + local do_not_backup_data=
2026-03-03 14:06:02,814: INFO - /home/yunohost.app/castopod will not be saved, because 'BACKUP_CORE_ONLY' is set.
2026-03-03 14:06:02,814: DEBUG - + [[ true == true ]]
2026-03-03 14:06:02,815: DEBUG - + [[ 0 -eq 1 ]]
2026-03-03 14:06:02,816: DEBUG - + [[ 1 -eq 1 ]]
2026-03-03 14:06:02,816: DEBUG - + ynh_print_info '/home/yunohost.app/castopod will not be saved, because '\''BACKUP_CORE_ONLY'\'' is set.'
2026-03-03 14:06:02,817: DEBUG - + return 0
2026-03-03 14:06:02,817: DEBUG - + ynh_backup /etc/nginx/conf.d/domain3.tld.d/castopod.conf
2026-03-03 14:06:02,818: DEBUG - + local target=/etc/nginx/conf.d/domain3.tld.d/castopod.conf
2026-03-03 14:06:02,818: DEBUG - + local is_data=false
2026-03-03 14:06:02,818: DEBUG - + [[ -n castopod ]]
2026-03-03 14:06:02,818: DEBUG - + [[ /etc/nginx/conf.d/domain3.tld.d/castopod.conf =~ ^/var/log/castopod/?\*?$ ]]
2026-03-03 14:06:02,819: DEBUG - + [[ -n /home/yunohost.app/castopod ]]
2026-03-03 14:06:02,819: DEBUG - + [[ /etc/nginx/conf.d/domain3.tld.d/castopod.conf =~ ^/home/yunohost.app/castopod ]]
2026-03-03 14:06:02,819: DEBUG - + [[ -n castopod ]]
2026-03-03 14:06:02,819: DEBUG - ++ ynh_app_setting_get --key=do_not_backup_data
2026-03-03 14:06:02,878: DEBUG - + local do_not_backup_data=
2026-03-03 14:06:02,878: DEBUG - + [[ false == true ]]
2026-03-03 14:06:02,878: DEBUG - + '[' '!' -e /etc/nginx/conf.d/domain3.tld.d/castopod.conf ']'
2026-03-03 14:06:02,878: DEBUG - ++ realpath /etc/nginx/conf.d/domain3.tld.d/castopod.conf
2026-03-03 14:06:02,880: DEBUG - + src_path=/etc/nginx/conf.d/domain3.tld.d/castopod.conf
2026-03-03 14:06:02,880: DEBUG - + dest_path=etc/nginx/conf.d/domain3.tld.d/castopod.conf
2026-03-03 14:06:02,880: DEBUG - + [[ -e etc/nginx/conf.d/domain3.tld.d/castopod.conf ]]
2026-03-03 14:06:02,880: DEBUG - + local rel_dir=/apps/castopod/backup
2026-03-03 14:06:02,881: DEBUG - + rel_dir=/apps/castopod/backup/
2026-03-03 14:06:02,881: DEBUG - + dest_path=/apps/castopod/backup/etc/nginx/conf.d/domain3.tld.d/castopod.conf
2026-03-03 14:06:02,881: DEBUG - + dest_path=apps/castopod/backup/etc/nginx/conf.d/domain3.tld.d/castopod.conf
2026-03-03 14:06:02,881: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g'
2026-03-03 14:06:02,881: DEBUG - ++ echo /etc/nginx/conf.d/domain3.tld.d/castopod.conf
2026-03-03 14:06:02,883: DEBUG - + local src=/etc/nginx/conf.d/domain3.tld.d/castopod.conf
2026-03-03 14:06:02,883: DEBUG - ++ echo apps/castopod/backup/etc/nginx/conf.d/domain3.tld.d/castopod.conf
2026-03-03 14:06:02,884: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g'
2026-03-03 14:06:02,885: DEBUG - + local dest=apps/castopod/backup/etc/nginx/conf.d/domain3.tld.d/castopod.conf
2026-03-03 14:06:02,886: DEBUG - ++ dirname /home/yunohost.backup/tmp/castopod-pre-upgrade2/apps/castopod/backup/etc/nginx/conf.d/domain3.tld.d/castopod.conf
2026-03-03 14:06:02,887: DEBUG - + mkdir --parents /home/yunohost.backup/tmp/castopod-pre-upgrade2/apps/castopod/backup/etc/nginx/conf.d/domain3.tld.d
2026-03-03 14:06:02,889: DEBUG - + ynh_backup /etc/cron.d/castopod
2026-03-03 14:06:02,889: DEBUG - + local target=/etc/cron.d/castopod
2026-03-03 14:06:02,889: DEBUG - + local is_data=false
2026-03-03 14:06:02,890: DEBUG - + [[ -n castopod ]]
2026-03-03 14:06:02,890: DEBUG - + [[ /etc/cron.d/castopod =~ ^/var/log/castopod/?\*?$ ]]
2026-03-03 14:06:02,890: DEBUG - + [[ -n /home/yunohost.app/castopod ]]
2026-03-03 14:06:02,890: DEBUG - + [[ /etc/cron.d/castopod =~ ^/home/yunohost.app/castopod ]]
2026-03-03 14:06:02,890: DEBUG - + [[ -n castopod ]]
2026-03-03 14:06:02,891: DEBUG - ++ ynh_app_setting_get --key=do_not_backup_data
2026-03-03 14:06:02,955: DEBUG - + local do_not_backup_data=
2026-03-03 14:06:02,956: DEBUG - + [[ false == true ]]
2026-03-03 14:06:02,956: DEBUG - + '[' '!' -e /etc/cron.d/castopod ']'
2026-03-03 14:06:02,956: DEBUG - ++ realpath /etc/cron.d/castopod
2026-03-03 14:06:02,957: DEBUG - + src_path=/etc/cron.d/castopod
2026-03-03 14:06:02,957: DEBUG - + dest_path=etc/cron.d/castopod
2026-03-03 14:06:02,958: DEBUG - + [[ -e etc/cron.d/castopod ]]
2026-03-03 14:06:02,958: DEBUG - + local rel_dir=/apps/castopod/backup
2026-03-03 14:06:02,958: DEBUG - + rel_dir=/apps/castopod/backup/
2026-03-03 14:06:02,959: DEBUG - + dest_path=/apps/castopod/backup/etc/cron.d/castopod
2026-03-03 14:06:02,959: DEBUG - + dest_path=apps/castopod/backup/etc/cron.d/castopod
2026-03-03 14:06:02,959: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g'
2026-03-03 14:06:02,960: DEBUG - ++ echo /etc/cron.d/castopod
2026-03-03 14:06:02,961: DEBUG - + local src=/etc/cron.d/castopod
2026-03-03 14:06:02,962: DEBUG - ++ echo apps/castopod/backup/etc/cron.d/castopod
2026-03-03 14:06:02,962: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g'
2026-03-03 14:06:02,965: DEBUG - + local dest=apps/castopod/backup/etc/cron.d/castopod
2026-03-03 14:06:02,965: DEBUG - ++ dirname /home/yunohost.backup/tmp/castopod-pre-upgrade2/apps/castopod/backup/etc/cron.d/castopod
2026-03-03 14:06:02,967: DEBUG - + mkdir --parents /home/yunohost.backup/tmp/castopod-pre-upgrade2/apps/castopod/backup/etc/cron.d
2026-03-03 14:06:02,969: DEBUG - + ynh_backup /etc/php/8.2/fpm/pool.d/castopod.conf
2026-03-03 14:06:02,969: DEBUG - + local target=/etc/php/8.2/fpm/pool.d/castopod.conf
2026-03-03 14:06:02,970: DEBUG - + local is_data=false
2026-03-03 14:06:02,970: DEBUG - + [[ -n castopod ]]
2026-03-03 14:06:02,970: DEBUG - + [[ /etc/php/8.2/fpm/pool.d/castopod.conf =~ ^/var/log/castopod/?\*?$ ]]
2026-03-03 14:06:02,970: DEBUG - + [[ -n /home/yunohost.app/castopod ]]
2026-03-03 14:06:02,971: DEBUG - + [[ /etc/php/8.2/fpm/pool.d/castopod.conf =~ ^/home/yunohost.app/castopod ]]
2026-03-03 14:06:02,971: DEBUG - + [[ -n castopod ]]
2026-03-03 14:06:02,971: DEBUG - ++ ynh_app_setting_get --key=do_not_backup_data
2026-03-03 14:06:03,041: DEBUG - + local do_not_backup_data=
2026-03-03 14:06:03,041: WARNING - File or folder '/etc/php/8.2/fpm/pool.d/castopod.conf' to be backed up does not exist
2026-03-03 14:06:03,042: DEBUG - + [[ false == true ]]
2026-03-03 14:06:03,042: DEBUG - + '[' '!' -e /etc/php/8.2/fpm/pool.d/castopod.conf ']'
2026-03-03 14:06:03,043: DEBUG - + ynh_print_warn 'File or folder '\''/etc/php/8.2/fpm/pool.d/castopod.conf'\'' to be backed up does not exist'
2026-03-03 14:06:03,043: DEBUG - + return 1
2026-03-03 14:06:03,043: DEBUG - + ynh_exit_properly
2026-03-03 14:06:03,044: DEBUG - + [[ backup =~ ^install$|^upgrade$|^restore$ ]]
2026-03-03 14:06:03,645: DEBUG - Konnte Skript nicht ausführen: /var/cache/yunohost/app_tmp_work_dirs/app_fuqe916k/scripts/backup
2026-03-03 14:06:03,646: ERROR - Failed to collect files to backed up for castopod.

Could you try running the following command prior to upgrade?

sudo yunohost app setting castopod php_version 8.4

This will fix up incorrectly set PHP version the app uses.

Thanks!

sudo yunohost app setting castopod php_version 8.4
usage: yunohost {app} ... [-h] [--output-as {json,plain,none}] [--debug] [--quiet] [--version] [--timeout ==SUPPRESS==]
yunohost: error: unrecognized arguments: 8.4

sudo yunohost app setting castopod php_version -v 8.4, sorry!

That worked! But still same error updating castopod:

Sammeln von Dateien, die für castopod gesichert werden sollen…
Declaring files to be backed up…
/home/yunohost.app/castopod will not be saved, because ‘BACKUP_CORE_ONLY’ is set.
File or folder ‘/etc/php/8.4/fpm/pool.d/castopod.conf’ to be backed up does not exist
Failed to collect files to backed up for castopod.

Actually I was wrong, the version Castopod at that revision uses is 8.2 (per manifest).

Is the application actually working? What’s the socket it’s talking to in /etc/nginx/domain.tld.d/castopod.conf?

Hi! I switched back to PHP 8.2.

/etc/nginx/conf.d/<domain.tld>.d/castopod.conf:

#sub_path_only rewrite ^/$ / permanent;
location / {

  # Path to source
  alias /var/www/castopod/public/;

  index index.php;
 
  client_max_body_size 512M;

  more_clear_headers 'X-Frame-Options';
  
  try_files $uri $uri/ /index.php;
  location ~ [^/]\.php(/|$) {
    fastcgi_pass unix:/var/run/php/php8.2-fpm-castopod.sock;
    include fastcgi_params_no_auth;
  }
}

location ^~ /media/ {
  alias /home/yunohost.app/castopod/media/;
  more_set_headers "Access-Control-Allow-Origin: *";
}

At the moment the website delivers a 502: https://bandmoment.de/

Can you comment out this line in /etc/yunohost/apps/castopod/scripts/backup, then try upgrading again?

Works! Thank you so much!

1 Like