System Update: Failure Unattended-upgrades (unattended_upgrades) from 1.0~ynh7 to 1.1~ynh1

Here is log. Can anyone help?

args:
apps:

  • unattended_upgrades
    name: unattended_upgrades-pre-upgrade2
    system: null
    ended_at: 2024-03-15 14:46:29.695565
    error: Nothing to save
    interface: api
    operation: backup_create
    parent: null
    related_to:
    • app
    • unattended_upgrades
      started_at: 2024-03-15 14:46:27.953549
      success: false
      yunohost_version: 11.2.10.3

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

2024-03-15 10:46:27,974: INFO - Collecting files to be backed up for unattended_upgrades…
2024-03-15 10:46:27,979: DEBUG - Executing command ‘[‘sh’, ‘-c’, ‘/bin/bash -x “/var/cache/yunohost/app_tmp_work_dirs/app_b7ephn3d/scripts/backup” 7>&1’]’
2024-03-15 10:46:27,984: DEBUG - + source …/settings/scripts/_common.sh
2024-03-15 10:46:27,984: DEBUG - ++ apticron_config=/etc/apticron/apticron.conf
2024-03-15 10:46:27,984: DEBUG - ++ apticron_config_backup=/etc/yunohost/apps/unattended_upgrades/conf/apticron.conf.backup
2024-03-15 10:46:27,985: DEBUG - ++ apticron_cron=/etc/cron.d/apticron
2024-03-15 10:46:27,985: DEBUG - ++ apticron_cron_backup=/etc/yunohost/apps/unattended_upgrades/conf/apticron.crond.backup
2024-03-15 10:46:27,985: DEBUG - ++ unattended_upgrades_config=/etc/apt/apt.conf.d/50unattended-upgrades
2024-03-15 10:46:27,985: DEBUG - ++ unattended_upgrades_config_backup=/etc/yunohost/apps/unattended_upgrades/conf/50unattended-upgrades.backup
2024-03-15 10:46:27,985: DEBUG - ++ _02periodic_config=/etc/apt/apt.conf.d/02periodic
2024-03-15 10:46:27,985: DEBUG - + source /usr/share/yunohost/helpers
2024-03-15 10:46:27,985: DEBUG - +++ set +o
2024-03-15 10:46:27,985: DEBUG - +++ grep xtrace
2024-03-15 10:46:27,986: DEBUG - ++ readonly ‘XTRACE_ENABLE=set -o xtrace’
2024-03-15 10:46:27,986: DEBUG - ++ XTRACE_ENABLE=‘set -o xtrace’
2024-03-15 10:46:28,000: DEBUG - + ynh_print_info ‘–message=Declaring files to be backed up…’
2024-03-15 10:46:28,006: INFO - Declaring files to be backed up…
2024-03-15 10:46:28,007: DEBUG - + ynh_backup --src_path=/etc/apticron/apticron.conf
2024-03-15 10:46:28,026: DEBUG - + dest_path=
2024-03-15 10:46:28,026: DEBUG - + is_big=0
2024-03-15 10:46:28,026: DEBUG - + not_mandatory=0
2024-03-15 10:46:28,026: DEBUG - + BACKUP_CORE_ONLY=1
2024-03-15 10:46:28,027: DEBUG - + test -n unattended_upgrades
2024-03-15 10:46:28,027: DEBUG - ++ ynh_app_setting_get --app=unattended_upgrades --key=do_not_backup_data
2024-03-15 10:46:28,027: DEBUG - ++ local globalapp=unattended_upgrades
2024-03-15 10:46:28,046: DEBUG - ++ app=unattended_upgrades
2024-03-15 10:46:28,046: DEBUG - ++ [[ do_not_backup_data =~ (unprotected|protected|skipped)
]]
2024-03-15 10:46:28,046: DEBUG - ++ ynh_app_setting get unattended_upgrades do_not_backup_data
2024-03-15 10:46:28,088: DEBUG - + do_not_backup_data=
2024-03-15 10:46:28,088: DEBUG - + ‘[’ ‘!’ -e /etc/apticron/apticron.conf ‘]’
2024-03-15 10:46:28,088: DEBUG - ++ realpath /etc/apticron/apticron.conf
2024-03-15 10:46:28,089: DEBUG - + src_path=/etc/apticron/apticron.conf
2024-03-15 10:46:28,089: DEBUG - + [[ -z ‘’ ]]
2024-03-15 10:46:28,089: DEBUG - + dest_path=etc/apticron/apticron.conf
2024-03-15 10:46:28,089: DEBUG - + [[ -e etc/apticron/apticron.conf ]]
2024-03-15 10:46:28,089: DEBUG - + local rel_dir=/apps/unattended_upgrades/backup
2024-03-15 10:46:28,089: DEBUG - + rel_dir=/apps/unattended_upgrades/backup/
2024-03-15 10:46:28,090: DEBUG - + dest_path=/apps/unattended_upgrades/backup/etc/apticron/apticron.conf
2024-03-15 10:46:28,090: DEBUG - + dest_path=apps/unattended_upgrades/backup/etc/apticron/apticron.conf
2024-03-15 10:46:28,090: DEBUG - ++ echo /etc/apticron/apticron.conf
2024-03-15 10:46:28,090: DEBUG - ++ sed --regexp-extended ‘s/"/""/g’
2024-03-15 10:46:28,091: DEBUG - + local src=/etc/apticron/apticron.conf
2024-03-15 10:46:28,091: DEBUG - ++ echo apps/unattended_upgrades/backup/etc/apticron/apticron.conf
2024-03-15 10:46:28,092: DEBUG - ++ sed --regexp-extended ‘s/"/""/g’
2024-03-15 10:46:28,093: DEBUG - + local dest=apps/unattended_upgrades/backup/etc/apticron/apticron.conf
2024-03-15 10:46:28,093: DEBUG - ++ dirname /home/yunohost.backup/tmp/unattended_upgrades-pre-upgrade2/apps/unattended_upgrades/backup/etc/apticron/apticron.conf
2024-03-15 10:46:28,094: DEBUG - + mkdir --parents /home/yunohost.backup/tmp/unattended_upgrades-pre-upgrade2/apps/unattended_upgrades/backup/etc/apticron
2024-03-15 10:46:28,095: DEBUG - + ynh_backup --src_path=/etc/yunohost/apps/unattended_upgrades/conf/apticron.conf.backup
2024-03-15 10:46:28,116: DEBUG - + dest_path=
2024-03-15 10:46:28,116: DEBUG - + is_big=0
2024-03-15 10:46:28,116: DEBUG - + not_mandatory=0
2024-03-15 10:46:28,116: DEBUG - + BACKUP_CORE_ONLY=1
2024-03-15 10:46:28,116: DEBUG - + test -n unattended_upgrades
2024-03-15 10:46:28,116: DEBUG - ++ ynh_app_setting_get --app=unattended_upgrades --key=do_not_backup_data
2024-03-15 10:46:28,116: DEBUG - ++ local globalapp=unattended_upgrades
2024-03-15 10:46:28,136: DEBUG - ++ app=unattended_upgrades
2024-03-15 10:46:28,136: DEBUG - ++ [[ do_not_backup_data =~ (unprotected|protected|skipped)
]]
2024-03-15 10:46:28,136: DEBUG - ++ ynh_app_setting get unattended_upgrades do_not_backup_data
2024-03-15 10:46:28,178: DEBUG - + do_not_backup_data=
2024-03-15 10:46:28,178: DEBUG - + ‘[’ ‘!’ -e /etc/yunohost/apps/unattended_upgrades/conf/apticron.conf.backup ‘]’
2024-03-15 10:46:28,178: DEBUG - + ynh_print_warn ‘–message=Source path ‘'’/etc/yunohost/apps/unattended_upgrades/conf/apticron.conf.backup’'’ does not exist’
2024-03-15 10:46:28,184: DEBUG - + ynh_print_log ‘Source path ‘'’/etc/yunohost/apps/unattended_upgrades/conf/apticron.conf.backup’'’ does not exist’
2024-03-15 10:46:28,184: DEBUG - + echo -e ‘Source path ‘'’/etc/yunohost/apps/unattended_upgrades/conf/apticron.conf.backup’'’ does not exist’
2024-03-15 10:46:28,184: DEBUG - + ‘[’ 0 == 0 ‘]’
2024-03-15 10:46:28,185: WARNING - Source path ‘/etc/yunohost/apps/unattended_upgrades/conf/apticron.conf.backup’ does not exist
2024-03-15 10:46:28,185: DEBUG - + grep --quiet /etc/fail2ban
2024-03-15 10:46:28,185: DEBUG - + echo /etc/yunohost/apps/unattended_upgrades/conf/apticron.conf.backup
2024-03-15 10:46:28,186: DEBUG - + return 1
2024-03-15 10:46:28,186: DEBUG - + ynh_exit_properly
2024-03-15 10:46:28,186: DEBUG - + [[ backup =~ ^install$|^upgrade$|^restore$ ]]
2024-03-15 10:46:29,690: DEBUG - Could not run script: /var/cache/yunohost/app_tmp_work_dirs/app_b7ephn3d/scripts/backup
2024-03-15 10:46:29,692: ERROR - Could not back up unattended_upgrades

As per the doc you need to perform the update with no safety backup as 1.0~ynh7came with broken backup script. The command to use (from terminal) is:

sudo yunohost app upgrade unattended_upgrades --no-safety-backup

1 Like

Merci

Thanks for the info! Worked for me too! :+1: