sudo yunohost backup create -n auto_qr --method borg_app --apps qr
Info: Collecting files to be backed up for qr...
Info: Declaring files to be backed up...
Info: Creating a backup archive from the collected files...
Info: The archive will contain about 1.7MB of data.
Warning: Failed to format translated string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}, raising error: KeyError('method') (don't panic this is just a warning)
Warning: Failed to format translatable string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments '()' and '{}', raising error: KeyError('method') (don't panic this is just a warning)
Warning: Remote: borg@oslight.ovh: Permission denied (publickey).
Warning: Connection closed by remote host. Is borg working on the server?
Error: Could not run script: /etc/yunohost/hooks.d/backup_method/05-borg_app
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 20231228-213803-backup_create' to get help
Error: Custom backup method could not get past the 'backup' step
and the associated log :
args:
apps:
- qr
description: null
dry_run: false
methods:
- borg_app
name: auto_qr
output_directory: null
system: null
ended_at: 2023-12-28 21:38:13.689381
error: Custom backup method could not get past the 'backup' step
interface: cli
operation: backup_create
parent: null
related_to:
- - app
- qr
started_at: 2023-12-28 21:38:03.044271
success: false
yunohost_version: 11.2.5
============
2023-12-28 21:38:03,072: INFO - Collecting files to be backed up for qr...
2023-12-28 21:38:03,081: DEBUG - Executing command '['sh', '-c', '/bin/bash -x "/var/cache/yunohost/app_tmp_work_dirs/app_g9e_k5uv/scripts/backup" 7>&1']'
2023-12-28 21:38:03,087: DEBUG - + source /usr/share/yunohost/helpers
2023-12-28 21:38:03,087: DEBUG - +++ set +o
2023-12-28 21:38:03,087: DEBUG - +++ grep xtrace
2023-12-28 21:38:03,089: DEBUG - ++ readonly 'XTRACE_ENABLE=set -o xtrace'
2023-12-28 21:38:03,089: DEBUG - ++ XTRACE_ENABLE='set -o xtrace'
2023-12-28 21:38:03,104: DEBUG - + ynh_print_info '--message=Declaring files to be backed up...'
2023-12-28 21:38:03,115: INFO - Declaring files to be backed up...
2023-12-28 21:38:03,116: DEBUG - + ynh_backup --src_path=/var/www/qr
2023-12-28 21:38:03,140: DEBUG - + dest_path=
2023-12-28 21:38:03,140: DEBUG - + is_big=0
2023-12-28 21:38:03,140: DEBUG - + not_mandatory=0
2023-12-28 21:38:03,141: DEBUG - + BACKUP_CORE_ONLY=0
2023-12-28 21:38:03,141: DEBUG - + test -n qr
2023-12-28 21:38:03,141: DEBUG - ++ ynh_app_setting_get --app=qr --key=do_not_backup_data
2023-12-28 21:38:03,141: DEBUG - ++ local _globalapp=qr
2023-12-28 21:38:03,163: DEBUG - ++ app=qr
2023-12-28 21:38:03,163: DEBUG - ++ [[ do_not_backup_data =~ (unprotected|protected|skipped)_ ]]
2023-12-28 21:38:03,163: DEBUG - ++ ynh_app_setting get qr do_not_backup_data
2023-12-28 21:38:03,206: DEBUG - + do_not_backup_data=
2023-12-28 21:38:03,206: DEBUG - + '[' '!' -e /var/www/qr ']'
2023-12-28 21:38:03,206: DEBUG - ++ realpath /var/www/qr
2023-12-28 21:38:03,207: DEBUG - + src_path=/var/www/qr
2023-12-28 21:38:03,207: DEBUG - + [[ -z '' ]]
2023-12-28 21:38:03,207: DEBUG - + dest_path=var/www/qr
2023-12-28 21:38:03,207: DEBUG - + [[ -e var/www/qr ]]
2023-12-28 21:38:03,208: DEBUG - + local rel_dir=/apps/qr/backup
2023-12-28 21:38:03,208: DEBUG - + rel_dir=/apps/qr/backup/
2023-12-28 21:38:03,208: DEBUG - + dest_path=/apps/qr/backup/var/www/qr
2023-12-28 21:38:03,208: DEBUG - + dest_path=apps/qr/backup/var/www/qr
2023-12-28 21:38:03,208: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g'
2023-12-28 21:38:03,209: DEBUG - ++ echo /var/www/qr
2023-12-28 21:38:03,210: DEBUG - + local src=/var/www/qr
2023-12-28 21:38:03,211: DEBUG - ++ echo apps/qr/backup/var/www/qr
2023-12-28 21:38:03,211: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g'
2023-12-28 21:38:03,212: DEBUG - + local dest=apps/qr/backup/var/www/qr
2023-12-28 21:38:03,213: DEBUG - ++ dirname /home/yunohost.backup/tmp/auto_qr/apps/qr/backup/var/www/qr
2023-12-28 21:38:03,213: DEBUG - + mkdir --parents /home/yunohost.backup/tmp/auto_qr/apps/qr/backup/var/www
2023-12-28 21:38:03,215: DEBUG - + ynh_backup --src_path=/etc/nginx/conf.d/maindomain.tld.d/qr.conf
2023-12-28 21:38:03,239: DEBUG - + dest_path=
2023-12-28 21:38:03,239: DEBUG - + is_big=0
2023-12-28 21:38:03,239: DEBUG - + not_mandatory=0
2023-12-28 21:38:03,239: DEBUG - + BACKUP_CORE_ONLY=0
2023-12-28 21:38:03,240: DEBUG - + test -n qr
2023-12-28 21:38:03,240: DEBUG - ++ ynh_app_setting_get --app=qr --key=do_not_backup_data
2023-12-28 21:38:03,240: DEBUG - ++ local _globalapp=qr
2023-12-28 21:38:03,265: DEBUG - ++ app=qr
2023-12-28 21:38:03,265: DEBUG - ++ [[ do_not_backup_data =~ (unprotected|protected|skipped)_ ]]
2023-12-28 21:38:03,265: DEBUG - ++ ynh_app_setting get qr do_not_backup_data
2023-12-28 21:38:03,310: DEBUG - + do_not_backup_data=
2023-12-28 21:38:03,310: DEBUG - + '[' '!' -e /etc/nginx/conf.d/maindomain.tld.d/qr.conf ']'
2023-12-28 21:38:03,310: DEBUG - ++ realpath /etc/nginx/conf.d/maindomain.tld.d/qr.conf
2023-12-28 21:38:03,311: DEBUG - + src_path=/etc/nginx/conf.d/maindomain.tld.d/qr.conf
2023-12-28 21:38:03,311: DEBUG - + [[ -z '' ]]
2023-12-28 21:38:03,311: DEBUG - + dest_path=etc/nginx/conf.d/maindomain.tld.d/qr.conf
2023-12-28 21:38:03,311: DEBUG - + [[ -e etc/nginx/conf.d/maindomain.tld.d/qr.conf ]]
2023-12-28 21:38:03,312: DEBUG - + local rel_dir=/apps/qr/backup
2023-12-28 21:38:03,312: DEBUG - + rel_dir=/apps/qr/backup/
2023-12-28 21:38:03,312: DEBUG - + dest_path=/apps/qr/backup/etc/nginx/conf.d/maindomain.tld.d/qr.conf
2023-12-28 21:38:03,312: DEBUG - + dest_path=apps/qr/backup/etc/nginx/conf.d/maindomain.tld.d/qr.conf
2023-12-28 21:38:03,312: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g'
2023-12-28 21:38:03,313: DEBUG - ++ echo /etc/nginx/conf.d/maindomain.tld.d/qr.conf
2023-12-28 21:38:03,313: DEBUG - + local src=/etc/nginx/conf.d/maindomain.tld.d/qr.conf
2023-12-28 21:38:03,313: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g'
2023-12-28 21:38:03,314: DEBUG - ++ echo apps/qr/backup/etc/nginx/conf.d/maindomain.tld.d/qr.conf
2023-12-28 21:38:03,315: DEBUG - + local dest=apps/qr/backup/etc/nginx/conf.d/maindomain.tld.d/qr.conf
2023-12-28 21:38:03,316: DEBUG - ++ dirname /home/yunohost.backup/tmp/auto_qr/apps/qr/backup/etc/nginx/conf.d/maindomain.tld.d/qr.conf
2023-12-28 21:38:03,316: DEBUG - + mkdir --parents /home/yunohost.backup/tmp/auto_qr/apps/qr/backup/etc/nginx/conf.d/maindomain.tld.d
2023-12-28 21:38:03,317: DEBUG - + ynh_backup --src_path=/etc/php/8.2/fpm/pool.d/qr.conf
2023-12-28 21:38:03,342: DEBUG - + dest_path=
2023-12-28 21:38:03,342: DEBUG - + is_big=0
2023-12-28 21:38:03,342: DEBUG - + not_mandatory=0
2023-12-28 21:38:03,342: DEBUG - + BACKUP_CORE_ONLY=0
2023-12-28 21:38:03,343: DEBUG - + test -n qr
2023-12-28 21:38:03,343: DEBUG - ++ ynh_app_setting_get --app=qr --key=do_not_backup_data
2023-12-28 21:38:03,343: DEBUG - ++ local _globalapp=qr
2023-12-28 21:38:03,369: DEBUG - ++ app=qr
2023-12-28 21:38:03,369: DEBUG - ++ [[ do_not_backup_data =~ (unprotected|protected|skipped)_ ]]
2023-12-28 21:38:03,369: DEBUG - ++ ynh_app_setting get qr do_not_backup_data
2023-12-28 21:38:03,419: DEBUG - + do_not_backup_data=
2023-12-28 21:38:03,419: DEBUG - + '[' '!' -e /etc/php/8.2/fpm/pool.d/qr.conf ']'
2023-12-28 21:38:03,419: DEBUG - ++ realpath /etc/php/8.2/fpm/pool.d/qr.conf
2023-12-28 21:38:03,421: DEBUG - + src_path=/etc/php/8.2/fpm/pool.d/qr.conf
2023-12-28 21:38:03,421: DEBUG - + [[ -z '' ]]
2023-12-28 21:38:03,421: DEBUG - + dest_path=etc/php/8.2/fpm/pool.d/qr.conf
2023-12-28 21:38:03,421: DEBUG - + [[ -e etc/php/8.2/fpm/pool.d/qr.conf ]]
2023-12-28 21:38:03,421: DEBUG - + local rel_dir=/apps/qr/backup
2023-12-28 21:38:03,421: DEBUG - + rel_dir=/apps/qr/backup/
2023-12-28 21:38:03,421: DEBUG - + dest_path=/apps/qr/backup/etc/php/8.2/fpm/pool.d/qr.conf
2023-12-28 21:38:03,422: DEBUG - + dest_path=apps/qr/backup/etc/php/8.2/fpm/pool.d/qr.conf
2023-12-28 21:38:03,422: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g'
2023-12-28 21:38:03,422: DEBUG - ++ echo /etc/php/8.2/fpm/pool.d/qr.conf
2023-12-28 21:38:03,424: DEBUG - + local src=/etc/php/8.2/fpm/pool.d/qr.conf
2023-12-28 21:38:03,425: DEBUG - ++ echo apps/qr/backup/etc/php/8.2/fpm/pool.d/qr.conf
2023-12-28 21:38:03,425: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g'
2023-12-28 21:38:03,427: DEBUG - + local dest=apps/qr/backup/etc/php/8.2/fpm/pool.d/qr.conf
2023-12-28 21:38:03,428: DEBUG - ++ dirname /home/yunohost.backup/tmp/auto_qr/apps/qr/backup/etc/php/8.2/fpm/pool.d/qr.conf
2023-12-28 21:38:03,429: DEBUG - + mkdir --parents /home/yunohost.backup/tmp/auto_qr/apps/qr/backup/etc/php/8.2/fpm/pool.d
2023-12-28 21:38:03,432: DEBUG - + ynh_exit_properly
2023-12-28 21:38:03,432: DEBUG - + [[ backup =~ ^install$|^upgrade$|^restore$ ]]
2023-12-28 21:38:04,434: DEBUG - Backup permission for qr
2023-12-28 21:38:04,480: DEBUG - initializing ldap interface
2023-12-28 21:38:04,523: INFO - Creating a backup archive from the collected files...
2023-12-28 21:38:04,523: INFO - The archive will contain about 1.7MB of data.
2023-12-28 21:38:04,524: DEBUG - Calling the custom backup method '{method}'...
2023-12-28 21:38:04,524: DEBUG - Executing command '['sh', '-c', '/bin/bash -x "./05-borg_app" need_mount /home/yunohost.backup/tmp/auto_qr auto_qr /home/yunohost.backup/archives 1731405 \'\' 7>&1']'
2023-12-28 21:38:04,529: DEBUG - + set -eo pipefail
2023-12-28 21:38:04,529: DEBUG - + app=borg_app
2023-12-28 21:38:04,529: DEBUG - + app=borg
2023-12-28 21:38:04,529: DEBUG - ++ yunohost app setting borg passphrase
2023-12-28 21:38:04,734: DEBUG - + BORG_PASSPHRASE=**********
2023-12-28 21:38:04,734: DEBUG - ++ yunohost app setting borg repository
2023-12-28 21:38:04,923: DEBUG - + repo=ssh://borg@oslight.ovh:22/~/backup
2023-12-28 21:38:04,924: DEBUG - + ssh-keygen -F '[oslight.ovh]:22'
2023-12-28 21:38:04,931: DEBUG - + BORG_RSH='ssh -i /root/.ssh/id_borg_ed25519 -oStrictHostKeyChecking=no '
2023-12-28 21:38:04,931: DEBUG - + LOGFILE=/var/log/backup_borg.err
2023-12-28 21:38:04,931: DEBUG - + work_dir=/home/yunohost.backup/tmp/auto_qr
2023-12-28 21:38:04,932: DEBUG - + name=auto_qr
2023-12-28 21:38:04,932: DEBUG - + size=1731405
2023-12-28 21:38:04,932: DEBUG - + description=
2023-12-28 21:38:04,932: DEBUG - + case "$1" in
2023-12-28 21:38:04,932: DEBUG - + do_need_mount /home/yunohost.backup/tmp/auto_qr auto_qr ssh://borg@oslight.ovh:22/~/backup 1731405 ''
2023-12-28 21:38:04,933: DEBUG - + true
2023-12-28 21:38:05,952: DEBUG - Executing command '['sh', '-c', '/bin/bash -x "./05-borg_app" backup /home/yunohost.backup/tmp/auto_qr auto_qr /home/yunohost.backup/archives 1731405 \'\' 7>&1']'
2023-12-28 21:38:05,958: DEBUG - + set -eo pipefail
2023-12-28 21:38:05,958: DEBUG - + app=borg_app
2023-12-28 21:38:05,959: DEBUG - + app=borg
2023-12-28 21:38:05,959: DEBUG - ++ yunohost app setting borg passphrase
2023-12-28 21:38:06,163: DEBUG - + BORG_PASSPHRASE=**********
2023-12-28 21:38:06,164: DEBUG - ++ yunohost app setting borg repository
2023-12-28 21:38:06,350: DEBUG - + repo=ssh://borg@oslight.ovh:22/~/backup
2023-12-28 21:38:06,351: DEBUG - + ssh-keygen -F '[oslight.ovh]:22'
2023-12-28 21:38:06,355: DEBUG - + BORG_RSH='ssh -i /root/.ssh/id_borg_ed25519 -oStrictHostKeyChecking=no '
2023-12-28 21:38:06,356: DEBUG - + LOGFILE=/var/log/backup_borg.err
2023-12-28 21:38:06,356: DEBUG - + work_dir=/home/yunohost.backup/tmp/auto_qr
2023-12-28 21:38:06,356: DEBUG - + name=auto_qr
2023-12-28 21:38:06,357: DEBUG - + size=1731405
2023-12-28 21:38:06,357: DEBUG - + description=
2023-12-28 21:38:06,357: DEBUG - + case "$1" in
2023-12-28 21:38:06,357: DEBUG - + do_backup /home/yunohost.backup/tmp/auto_qr auto_qr ssh://borg@oslight.ovh:22/~/backup 1731405 ''
2023-12-28 21:38:06,358: DEBUG - + export BORG_PASSPHRASE
2023-12-28 21:38:06,358: DEBUG - + export BORG_RSH
2023-12-28 21:38:06,358: DEBUG - + export BORG_RELOCATED_REPO_ACCESS_IS_OK=yes
2023-12-28 21:38:06,358: DEBUG - + BORG_RELOCATED_REPO_ACCESS_IS_OK=yes
2023-12-28 21:38:06,358: DEBUG - + work_dir=/home/yunohost.backup/tmp/auto_qr
2023-12-28 21:38:06,358: DEBUG - + name=auto_qr
2023-12-28 21:38:06,359: DEBUG - + repo=ssh://borg@oslight.ovh:22/~/backup
2023-12-28 21:38:06,359: DEBUG - + size=1731405
2023-12-28 21:38:06,359: DEBUG - + description=
2023-12-28 21:38:06,359: DEBUG - ++ date +%Y-%m-%d_%H:%M
2023-12-28 21:38:06,359: DEBUG - + current_date=2023-12-28_21:38
2023-12-28 21:38:06,359: DEBUG - + pushd /home/yunohost.backup/tmp/auto_qr
2023-12-28 21:38:06,359: DEBUG - /home/yunohost.backup/tmp/auto_qr /etc/yunohost/hooks.d/backup_method
2023-12-28 21:38:06,359: DEBUG - + set +e
2023-12-28 21:38:06,359: DEBUG - + borg init -e repokey ssh://borg@oslight.ovh:22/~/backup
2023-12-28 21:38:11,950: WARNING - Remote: borg@oslight.ovh: Permission denied (publickey).
2023-12-28 21:38:11,951: WARNING - Connection closed by remote host. Is borg working on the server?
2023-12-28 21:38:11,980: DEBUG - + set -e
2023-12-28 21:38:11,981: DEBUG - + log_with_timestamp
2023-12-28 21:38:11,981: DEBUG - + tee -a /var/log/backup_borg.err
2023-12-28 21:38:11,981: DEBUG - + borg create ssh://borg@oslight.ovh:22/~/backup::_auto_qr-2023-12-28_21:38 ./
2023-12-28 21:38:11,982: DEBUG - ++ date +%Y-%m-%d_%H:%M:%S
2023-12-28 21:38:11,984: DEBUG - + sed -e 's/^/[2023-12-28_21:38:11] /'
2023-12-28 21:38:12,668: DEBUG - [2023-12-28_21:38:11] Remote: borg@oslight.ovh: Permission denied (publickey).
2023-12-28 21:38:12,668: DEBUG - [2023-12-28_21:38:11] Connection closed by remote host. Is borg working on the server?
2023-12-28 21:38:13,669: ERROR - Could not run script: /etc/yunohost/hooks.d/backup_method/05-borg_app
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/yunohost/hook.py", line 298, in hook_callback
hook_return = hook_exec(
File "/usr/lib/python3/dist-packages/yunohost/hook.py", line 410, in hook_exec
raise YunohostError("hook_exec_failed", path=path)
yunohost.utils.error.YunohostError: Could not run script: /etc/yunohost/hooks.d/backup_method/05-borg_app