YunoHost-Apps / restic_ynh

Restic package for YunoHost
https://restic.net/
GNU Affero General Public License v3.0
6 stars 7 forks source link

Backup failures not reported #16

Open matlag opened 1 year ago

matlag commented 1 year ago

Describe the bug

Backup of Nextcloud has been failing repeatedly over the past weeks, and emails report SUCCESS just not listing nextcloud in the app's list.

Context

Steps to reproduce

Expected behavior

If/when nextcloud backup is abandoned, emails should explicitly reports so Title could be : Yunohost Restic backup log on serverName (PARTIAL SUCCESS) and in the content: nextcloud: Failure

Logs

Jan 23 09:41:24 serverName sudo[669900]: restic : PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost backup create -n auto_nextcloud --method restic_app --apps nextcloud Jan 23 09:41:24 serverName sudo[669900]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1001) Jan 23 09:41:24 serverName backup-with-restic[669903]: Collecting files to be backed up for nextcloud... Jan 23 09:41:24 serverName backup-with-restic[669903]: Loading installation settings... Jan 23 09:41:24 serverName backup-with-restic[669903]: Declaring files to be backed up... Jan 23 09:41:25 serverName backup-with-restic[669903]: Backing up the MySQL database... Jan 23 09:41:30 serverName backup-with-restic[669903]: Backing up data directory... Jan 23 09:41:30 serverName backup-with-restic[669903]: Backup script completed for nextcloud. (YunoHost will then actually copy those files to the archive). Jan 23 09:42:30 serverName backup-with-restic[669903]: Creating a backup archive from the collected files... Jan 23 09:42:30 serverName backup-with-restic[669903]: The archive will contain about 115.4GiB of data. Jan 23 09:42:30 serverName backup-with-restic[669903]: Failed to format translated string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with arguments> Jan 23 09:42:30 serverName backup-with-restic[669903]: Failed to format translatable string 'backup_applying_method_custom': 'Calling the custom backup method '{method}'...' with argumen> Jan 23 09:42:37 serverName backup-with-restic[669903]: unable to open cache: unable to locate cache directory: neither $XDG_CACHE_HOME nor $HOME are defined Jan 23 09:42:46 serverName backup-with-restic[669903]: unable to open cache: unable to locate cache directory: neither $XDG_CACHE_HOME nor $HOME are defined Jan 24 12:53:12 serverName backup-with-restic[669903]: unable to open cache: unable to locate cache directory: neither $XDG_CACHE_HOME nor $HOME are defined Jan 24 12:53:13 serverName backup-with-restic[669903]: unable to create lock in backend: repository is already locked by PID 613420 on serverName by root (UID 0, GID 0) Jan 24 12:53:13 serverName backup-with-restic[669903]: lock was created at 2023-01-22 23:27:58 (37h25m14.388268472s ago) Jan 24 12:53:13 serverName backup-with-restic[669903]: storage ID dc77ea5e Jan 24 12:53:13 serverName backup-with-restic[669903]: the unlock command can be used to remove stale locks Jan 24 12:53:14 serverName backup-with-restic[669903]: Could not run script: /etc/yunohost/hooks.d/backup_method/05-restic_app Jan 24 12:53:14 serverName backup-with-restic[669903]: The operation 'Create a backup archive' could not be completed. Please share the full log of this operation using the command 'yuno> Jan 24 12:53:14 serverName backup-with-restic[669903]: Custom backup method could not get past the 'backup' step Jan 24 12:53:14 serverName sudo[669900]: pam_unix(sudo:session): session closed for user root Jan 24 12:53:15 serverName sudo[752240]: restic : PWD=/ ; USER=root ; COMMAND=/bin/journalctl _SYSTEMD_INVOCATION_ID=821610090add43d9b04740a94c650bff Jan 24 12:53:15 serverName sudo[752240]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1001) Jan 24 12:53:19 serverName sudo[752240]: pam_unix(sudo:session): session closed for user root Jan 24 12:53:19 serverName systemd[1]: restic.service: Succeeded. Jan 24 12:53:19 serverName systemd[1]: Finished Run backup restic. Jan 24 12:53:19 serverName systemd[1]: restic.service: Consumed 14min 15.309s CPU time.

valterbarreira commented 1 year ago

This is happening with me, i also backup to a S3 bucket, and recently some apps are giving error, and are not showing in emails. The only apps reporting success are:

conf_ldap: Success conf_manually_modified_files: Success conf_ynh_certs: Success conf_ynh_settings: Success ffsync: Success roundcube: Success snserver: Success adguardhome: Success snweb: Success

One of the apps not backing up error log: args: apps:

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

2023-01-30 01:42:24,319: INFO - Collecting files to be backed up for my_webapp... 2023-01-30 01:42:24,335: DEBUG - Executing command '['sh', '-c', '/bin/bash -x "/var/cache/yunohost/app_tmp_work_dirs/app_2wxzjg4y/scripts/backup" 7>&1']' 2023-01-30 01:42:24,341: DEBUG - + source ../settings/scripts/_common.sh 2023-01-30 01:42:24,341: DEBUG - + source /usr/share/yunohost/helpers 2023-01-30 01:42:24,341: DEBUG - +++ set +o 2023-01-30 01:42:24,342: DEBUG - +++ grep xtrace 2023-01-30 01:42:24,343: DEBUG - ++ readonly 'XTRACE_ENABLE=set -o xtrace' 2023-01-30 01:42:24,343: DEBUG - ++ XTRACE_ENABLE='set -o xtrace' 2023-01-30 01:42:24,355: DEBUG - + ynh_abort_if_errors 2023-01-30 01:42:24,355: DEBUG - + trap ynh_exit_properly EXIT 2023-01-30 01:42:24,355: DEBUG - + ynh_print_info '--message=Loading installation settings...' 2023-01-30 01:42:24,362: INFO - Loading installation settings... 2023-01-30 01:42:24,362: DEBUG - + app=my_webapp 2023-01-30 01:42:24,362: DEBUG - ++ ynh_app_setting_get --app=my_webapp --key=final_path 2023-01-30 01:42:24,363: DEBUG - ++ local _globalapp=my_webapp 2023-01-30 01:42:24,391: DEBUG - ++ app=my_webapp 2023-01-30 01:42:24,391: DEBUG - ++ [[ finalpath =~ (unprotected|protected|skipped) ]] 2023-01-30 01:42:24,391: DEBUG - ++ ynh_app_setting get my_webapp final_path 2023-01-30 01:42:24,431: DEBUG - + final_path=/var/www/my_webapp 2023-01-30 01:42:24,431: DEBUG - ++ ynh_app_setting_get --app=my_webapp --key=domain 2023-01-30 01:42:24,432: DEBUG - ++ local _globalapp=my_webapp 2023-01-30 01:42:24,458: DEBUG - ++ app=mywebapp 2023-01-30 01:42:24,458: DEBUG - ++ [[ domain =~ (unprotected|protected|skipped) ]] 2023-01-30 01:42:24,458: DEBUG - ++ ynh_app_setting get my_webapp domain 2023-01-30 01:42:24,500: DEBUG - + domain=domain2.tld 2023-01-30 01:42:24,501: DEBUG - ++ ynh_app_setting_get --app=my_webapp --key=db_name 2023-01-30 01:42:24,501: DEBUG - ++ local _globalapp=my_webapp 2023-01-30 01:42:24,525: DEBUG - ++ app=my_webapp 2023-01-30 01:42:24,526: DEBUG - ++ [[ dbname =~ (unprotected|protected|skipped) ]] 2023-01-30 01:42:24,526: DEBUG - ++ ynh_app_setting get my_webapp db_name 2023-01-30 01:42:24,564: DEBUG - + db_name=my_webapp 2023-01-30 01:42:24,565: DEBUG - ++ ynh_app_setting_get --app=my_webapp --key=with_mysql 2023-01-30 01:42:24,565: DEBUG - ++ local _globalapp=my_webapp 2023-01-30 01:42:24,589: DEBUG - ++ app=my_webapp 2023-01-30 01:42:24,589: DEBUG - ++ [[ withmysql =~ (unprotected|protected|skipped) ]] 2023-01-30 01:42:24,589: DEBUG - ++ ynh_app_setting get my_webapp with_mysql 2023-01-30 01:42:24,637: DEBUG - + with_mysql=0 2023-01-30 01:42:24,638: DEBUG - ++ ynh_app_setting_get --app=my_webapp --key=with_sftp 2023-01-30 01:42:24,638: DEBUG - ++ local _globalapp=my_webapp 2023-01-30 01:42:24,671: DEBUG - ++ app=my_webapp 2023-01-30 01:42:24,672: DEBUG - ++ [[ withsftp =~ (unprotected|protected|skipped) ]] 2023-01-30 01:42:24,672: DEBUG - ++ ynh_app_setting get my_webapp with_sftp 2023-01-30 01:42:24,723: DEBUG - + with_sftp=0 2023-01-30 01:42:24,724: DEBUG - ++ ynh_app_setting_get --app=my_webapp --key=phpversion 2023-01-30 01:42:24,724: DEBUG - ++ local _globalapp=my_webapp 2023-01-30 01:42:24,765: DEBUG - ++ app=mywebapp 2023-01-30 01:42:24,766: DEBUG - ++ [[ phpversion =~ (unprotected|protected|skipped) ]] 2023-01-30 01:42:24,766: DEBUG - ++ ynh_app_setting get my_webapp phpversion 2023-01-30 01:42:24,816: DEBUG - + phpversion=8.0 2023-01-30 01:42:24,816: DEBUG - + ynh_print_info '--message=Declaring files to be backed up...' 2023-01-30 01:42:24,829: INFO - Declaring files to be backed up... 2023-01-30 01:42:24,829: DEBUG - + ynh_backup --src_path=/var/www/my_webapp 2023-01-30 01:42:24,869: DEBUG - + dest_path= 2023-01-30 01:42:24,869: DEBUG - + is_big=0 2023-01-30 01:42:24,869: DEBUG - + not_mandatory=0 2023-01-30 01:42:24,869: DEBUG - + BACKUP_CORE_ONLY=0 2023-01-30 01:42:24,870: DEBUG - + test -n my_webapp 2023-01-30 01:42:24,870: DEBUG - ++ ynh_app_setting_get --app=my_webapp --key=do_not_backup_data 2023-01-30 01:42:24,870: DEBUG - ++ local _globalapp=my_webapp 2023-01-30 01:42:24,917: DEBUG - ++ app=my_webapp 2023-01-30 01:42:24,917: DEBUG - ++ [[ do_not_backupdata =~ (unprotected|protected|skipped) ]] 2023-01-30 01:42:24,917: DEBUG - ++ ynh_app_setting get my_webapp do_not_backup_data 2023-01-30 01:42:24,957: DEBUG - + do_not_backup_data= 2023-01-30 01:42:24,958: DEBUG - + '[' '!' -e /var/www/my_webapp ']' 2023-01-30 01:42:24,958: DEBUG - ++ realpath /var/www/my_webapp 2023-01-30 01:42:24,960: DEBUG - + src_path=/var/www/my_webapp 2023-01-30 01:42:24,961: DEBUG - + [[ -z '' ]] 2023-01-30 01:42:24,961: DEBUG - + dest_path=var/www/my_webapp 2023-01-30 01:42:24,961: DEBUG - + [[ -e var/www/my_webapp ]] 2023-01-30 01:42:24,961: DEBUG - + local rel_dir=/apps/my_webapp/backup 2023-01-30 01:42:24,961: DEBUG - + rel_dir=/apps/my_webapp/backup/ 2023-01-30 01:42:24,961: DEBUG - + dest_path=/apps/my_webapp/backup/var/www/my_webapp 2023-01-30 01:42:24,961: DEBUG - + dest_path=apps/my_webapp/backup/var/www/my_webapp 2023-01-30 01:42:24,961: DEBUG - ++ echo /var/www/my_webapp 2023-01-30 01:42:24,962: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g' 2023-01-30 01:42:24,964: DEBUG - + local src=/var/www/my_webapp 2023-01-30 01:42:24,965: DEBUG - ++ echo apps/my_webapp/backup/var/www/my_webapp 2023-01-30 01:42:24,965: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g' 2023-01-30 01:42:24,968: DEBUG - + local dest=apps/my_webapp/backup/var/www/my_webapp 2023-01-30 01:42:24,969: DEBUG - ++ dirname /home/yunohost.backup/tmp/auto_my_webapp/apps/my_webapp/backup/var/www/my_webapp 2023-01-30 01:42:24,970: DEBUG - + mkdir --parents /home/yunohost.backup/tmp/auto_my_webapp/apps/my_webapp/backup/var/www 2023-01-30 01:42:24,972: DEBUG - + ynh_backup --src_path=/etc/nginx/conf.d/domain2.tld.d/my_webapp.conf 2023-01-30 01:42:25,002: DEBUG - + dest_path= 2023-01-30 01:42:25,002: DEBUG - + is_big=0 2023-01-30 01:42:25,002: DEBUG - + not_mandatory=0 2023-01-30 01:42:25,003: DEBUG - + BACKUP_CORE_ONLY=0 2023-01-30 01:42:25,003: DEBUG - + test -n my_webapp 2023-01-30 01:42:25,003: DEBUG - ++ ynh_app_setting_get --app=my_webapp --key=do_not_backup_data 2023-01-30 01:42:25,003: DEBUG - ++ local _globalapp=my_webapp 2023-01-30 01:42:25,046: DEBUG - ++ app=my_webapp 2023-01-30 01:42:25,046: DEBUG - ++ [[ do_not_backupdata =~ (unprotected|protected|skipped) ]] 2023-01-30 01:42:25,046: DEBUG - ++ ynh_app_setting get my_webapp do_not_backup_data 2023-01-30 01:42:25,087: DEBUG - + do_not_backup_data= 2023-01-30 01:42:25,087: DEBUG - + '[' '!' -e /etc/nginx/conf.d/domain2.tld.d/my_webapp.conf ']' 2023-01-30 01:42:25,088: DEBUG - ++ realpath /etc/nginx/conf.d/domain2.tld.d/my_webapp.conf 2023-01-30 01:42:25,090: DEBUG - + src_path=/etc/nginx/conf.d/domain2.tld.d/my_webapp.conf 2023-01-30 01:42:25,090: DEBUG - + [[ -z '' ]] 2023-01-30 01:42:25,090: DEBUG - + dest_path=etc/nginx/conf.d/domain2.tld.d/my_webapp.conf 2023-01-30 01:42:25,090: DEBUG - + [[ -e etc/nginx/conf.d/domain2.tld.d/my_webapp.conf ]] 2023-01-30 01:42:25,090: DEBUG - + local rel_dir=/apps/my_webapp/backup 2023-01-30 01:42:25,090: DEBUG - + rel_dir=/apps/my_webapp/backup/ 2023-01-30 01:42:25,090: DEBUG - + dest_path=/apps/my_webapp/backup/etc/nginx/conf.d/domain2.tld.d/my_webapp.conf 2023-01-30 01:42:25,090: DEBUG - + dest_path=apps/my_webapp/backup/etc/nginx/conf.d/domain2.tld.d/my_webapp.conf 2023-01-30 01:42:25,090: DEBUG - ++ echo /etc/nginx/conf.d/domain2.tld.d/my_webapp.conf 2023-01-30 01:42:25,091: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g' 2023-01-30 01:42:25,095: DEBUG - + local src=/etc/nginx/conf.d/domain2.tld.d/my_webapp.conf 2023-01-30 01:42:25,096: DEBUG - ++ echo apps/my_webapp/backup/etc/nginx/conf.d/domain2.tld.d/my_webapp.conf 2023-01-30 01:42:25,096: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g' 2023-01-30 01:42:25,100: DEBUG - + local dest=apps/my_webapp/backup/etc/nginx/conf.d/domain2.tld.d/my_webapp.conf 2023-01-30 01:42:25,101: DEBUG - ++ dirname /home/yunohost.backup/tmp/auto_my_webapp/apps/my_webapp/backup/etc/nginx/conf.d/domain2.tld.d/my_webapp.conf 2023-01-30 01:42:25,102: DEBUG - + mkdir --parents /home/yunohost.backup/tmp/auto_my_webapp/apps/my_webapp/backup/etc/nginx/conf.d/domain2.tld.d 2023-01-30 01:42:25,105: DEBUG - + '[' 8.0 '!=' none ']' 2023-01-30 01:42:25,105: DEBUG - + ynh_backup --src_path=/etc/php/8.0/fpm/pool.d/my_webapp.conf 2023-01-30 01:42:25,154: DEBUG - + dest_path= 2023-01-30 01:42:25,155: DEBUG - + is_big=0 2023-01-30 01:42:25,155: DEBUG - + not_mandatory=0 2023-01-30 01:42:25,155: DEBUG - + BACKUP_CORE_ONLY=0 2023-01-30 01:42:25,155: DEBUG - + test -n my_webapp 2023-01-30 01:42:25,155: DEBUG - ++ ynh_app_setting_get --app=my_webapp --key=do_not_backup_data 2023-01-30 01:42:25,155: DEBUG - ++ local _globalapp=my_webapp 2023-01-30 01:42:25,196: DEBUG - ++ app=my_webapp 2023-01-30 01:42:25,197: DEBUG - ++ [[ do_not_backupdata =~ (unprotected|protected|skipped) ]] 2023-01-30 01:42:25,197: DEBUG - ++ ynh_app_setting get my_webapp do_not_backup_data 2023-01-30 01:42:25,237: DEBUG - + do_not_backup_data= 2023-01-30 01:42:25,238: DEBUG - + '[' '!' -e /etc/php/8.0/fpm/pool.d/my_webapp.conf ']' 2023-01-30 01:42:25,238: DEBUG - ++ realpath /etc/php/8.0/fpm/pool.d/my_webapp.conf 2023-01-30 01:42:25,240: DEBUG - + src_path=/etc/php/8.0/fpm/pool.d/my_webapp.conf 2023-01-30 01:42:25,240: DEBUG - + [[ -z '' ]] 2023-01-30 01:42:25,240: DEBUG - + dest_path=etc/php/8.0/fpm/pool.d/my_webapp.conf 2023-01-30 01:42:25,240: DEBUG - + [[ -e etc/php/8.0/fpm/pool.d/my_webapp.conf ]] 2023-01-30 01:42:25,240: DEBUG - + local rel_dir=/apps/my_webapp/backup 2023-01-30 01:42:25,241: DEBUG - + rel_dir=/apps/my_webapp/backup/ 2023-01-30 01:42:25,241: DEBUG - + dest_path=/apps/my_webapp/backup/etc/php/8.0/fpm/pool.d/my_webapp.conf 2023-01-30 01:42:25,241: DEBUG - + dest_path=apps/my_webapp/backup/etc/php/8.0/fpm/pool.d/my_webapp.conf 2023-01-30 01:42:25,241: DEBUG - ++ echo /etc/php/8.0/fpm/pool.d/my_webapp.conf 2023-01-30 01:42:25,241: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g' 2023-01-30 01:42:25,243: DEBUG - + local src=/etc/php/8.0/fpm/pool.d/my_webapp.conf 2023-01-30 01:42:25,243: DEBUG - ++ echo apps/my_webapp/backup/etc/php/8.0/fpm/pool.d/my_webapp.conf 2023-01-30 01:42:25,243: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g' 2023-01-30 01:42:25,245: DEBUG - + local dest=apps/my_webapp/backup/etc/php/8.0/fpm/pool.d/my_webapp.conf 2023-01-30 01:42:25,245: DEBUG - ++ dirname /home/yunohost.backup/tmp/auto_my_webapp/apps/my_webapp/backup/etc/php/8.0/fpm/pool.d/my_webapp.conf 2023-01-30 01:42:25,247: DEBUG - + mkdir --parents /home/yunohost.backup/tmp/auto_my_webapp/apps/my_webapp/backup/etc/php/8.0/fpm/pool.d 2023-01-30 01:42:25,249: DEBUG - + ynh_print_info '--message=Backup script completed for my_webapp. (YunoHost will then actually copy those files to the archive).' 2023-01-30 01:42:25,259: INFO - Backup script completed for my_webapp. (YunoHost will then actually copy those files to the archive). 2023-01-30 01:42:25,259: DEBUG - + ynh_exit_properly 2023-01-30 01:42:26,262: DEBUG - Backup permission for my_webapp 2023-01-30 01:42:26,304: DEBUG - initializing ldap interface 2023-01-30 01:42:26,367: INFO - Creating a backup archive from the collected files... 2023-01-30 01:42:26,368: INFO - The archive will contain about 6.9MiB of data. 2023-01-30 01:42:26,368: DEBUG - Calling the custom backup method '{method}'... 2023-01-30 01:42:26,369: DEBUG - Executing command '['sh', '-c', '/bin/bash -x "./05-restic_app" need_mount /home/yunohost.backup/tmp/auto_my_webapp auto_my_webapp /home/yunohost.backup/archives 7287203 \'\' 7>&1']' 2023-01-30 01:42:26,375: DEBUG - + set -e 2023-01-30 01:42:26,375: DEBUG - ++ yunohost app setting restic server 2023-01-30 01:42:26,564: DEBUG - + RESTIC_SERVER=localhost 2023-01-30 01:42:26,564: DEBUG - ++ yunohost app setting restic port 2023-01-30 01:42:26,741: DEBUG - + RESTIC_SERVER_PORT=22 2023-01-30 01:42:26,742: DEBUG - ++ yunohost app setting restic ssh_user 2023-01-30 01:42:26,929: DEBUG - + RESTIC_SERVER_USER=root 2023-01-30 01:42:26,929: DEBUG - ++ yunohost app setting restic backup_path 2023-01-30 01:42:27,120: DEBUG - + RESTIC_PATH=/mnt/backups 2023-01-30 01:42:27,121: DEBUG - ++ yunohost app setting restic passphrase 2023-01-30 01:42:27,322: DEBUG - + RESTIC_PASSWORD=***** 2023-01-30 01:42:27,322: DEBUG - + RESTIC_REPOSITORY_BASE=sftp://root@localhost:22//mnt/backups/ 2023-01-30 01:42:27,322: DEBUG - + RESTIC_COMMAND=/usr/local/bin/restic 2023-01-30 01:42:27,322: DEBUG - + LOGFILE=/var/log/restic_backup_restic.log 2023-01-30 01:42:27,322: DEBUG - + ERRFILE=/var/log/restic_backup_restic.err 2023-01-30 01:42:27,322: DEBUG - + work_dir=/home/yunohost.backup/tmp/auto_my_webapp 2023-01-30 01:42:27,322: DEBUG - + name=auto_my_webapp 2023-01-30 01:42:27,322: DEBUG - + size=7287203 2023-01-30 01:42:27,322: DEBUG - + description= 2023-01-30 01:42:27,322: DEBUG - + case "$1" in 2023-01-30 01:42:27,322: DEBUG - + do_need_mount /home/yunohost.backup/tmp/auto_my_webapp auto_my_webapp 7287203 2023-01-30 01:42:27,323: DEBUG - + work_dir=/home/yunohost.backup/tmp/auto_my_webapp 2023-01-30 01:42:27,323: DEBUG - + name=auto_my_webapp 2023-01-30 01:42:27,323: DEBUG - + repo=7287203 2023-01-30 01:42:27,323: DEBUG - + size= 2023-01-30 01:42:27,323: DEBUG - + description= 2023-01-30 01:42:27,323: DEBUG - + export RESTIC_PASSWORD 2023-01-30 01:42:27,323: DEBUG - + export RESTIC_REPOSITORY=sftp://root@localhost:22//mnt/backups//auto_my_webapp 2023-01-30 01:42:27,323: DEBUG - + RESTIC_REPOSITORY=sftp://root@localhost:22//mnt/backups//auto_my_webapp 2023-01-30 01:42:27,323: DEBUG - + /usr/local/bin/restic list snapshots 2023-01-30 01:42:27,323: DEBUG - ++ tee -a /var/log/restic_backup_restic.log 2023-01-30 01:42:27,323: DEBUG - ++ tee -a /var/log/restic_backup_restic.err 2023-01-30 01:42:27,324: WARNING - tee: /var/log/restic_backup_restic.err: Is a directory 2023-01-30 01:42:27,356: WARNING - subprocess ssh: Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts. 2023-01-30 01:42:28,030: WARNING - unable to open cache: unable to locate cache directory: neither $XDG_CACHE_HOME nor $HOME are defined 2023-01-30 01:42:34,333: DEBUG - 0d6a96cac907351c662b31dbb9989fdffc5f97f1c768dc2c4f4d57131d77d5db 2023-01-30 01:42:34,333: DEBUG - 11770206f8a867619e64570536b1549b4ecd468997d2ea47e1e7af3936c549b4 2023-01-30 01:42:34,333: DEBUG - 124dbe59be5961ebb14aaedc35fa617eb6adbf6d2bb33b135844b463e95ff151 2023-01-30 01:42:34,333: DEBUG - 1798c25bce00867ff50638121970ad14a7e6ba4051e111d2c93dfb48c30f93fb 2023-01-30 01:42:34,333: DEBUG - 361e4d1962a221788672db4cc82136eb8d5ca736aaa10c70a3d6aefa6e0084f3 2023-01-30 01:42:34,333: DEBUG - 3798db78c607650882bb29d6e90c977d3b542b911a4a815ee5a1f8c6f98aefc9 2023-01-30 01:42:34,333: DEBUG - 3aef01ba13061ed0bffbd4b289b9459a3e86e12079821352a3036d6d6e439c07 2023-01-30 01:42:34,333: DEBUG - 5c08e5435eda603035cc96e6e9d02ac1e708a80335d4b4175f0071d423ed44cc 2023-01-30 01:42:34,333: DEBUG - 6809f0bd0d0be5bf9aa2bbf526a0810968852058e23c54f57d77de44259122ff 2023-01-30 01:42:34,334: DEBUG - 7406cf62acd58a61096e07c6475d0804231c33e9198c985e6330340db0a9e2ba 2023-01-30 01:42:34,334: DEBUG - 79b2829e85aa074fa813e955eec44cf8f334a034c0ebb1a84aa9e9d49777a064 2023-01-30 01:42:34,334: DEBUG - 9e6bac2f6e4550d9275ab0ed7d53fed7f4fcdffd1cc7776516d2034d99c2c344 2023-01-30 01:42:34,334: DEBUG - a11457b5151315364e02acfba95ab5120d67e0d23485ef33d9d9a28d9b5c121f 2023-01-30 01:42:34,334: DEBUG - abe320d736a72b12867ea5421d7d1f8880f7f949844fe255ee55180b216ad804 2023-01-30 01:42:34,334: DEBUG - c2eee4bc1491f538542c4f5caba66cf5dae9ce35c4058b1e28114f1b4d28b047 2023-01-30 01:42:34,334: DEBUG - ce95e37c377fcacd77c3aeb1a8c5769f7f43b51641c58a8b21b057d8d5776396 2023-01-30 01:42:34,334: DEBUG - cf18a59e0ec26b64c297772542264e8034bf3429d1faea1f5498ce02a7545d99 2023-01-30 01:42:34,335: DEBUG - cf53253d127697f5958241a4cc921c90952f99926cab8ddbd930c879e6e5c2bf 2023-01-30 01:42:34,335: DEBUG - d8adca47a53e7f21c5512d78337fefa4c12376e6f8d3ab5c69bd6d9f2b38f18b 2023-01-30 01:42:34,335: DEBUG - db63c7397c19a47f00e3034cf679b37b04b36ec9bd3ecb7199ac904b5f23cc11 2023-01-30 01:42:34,335: DEBUG - f7a675094eaecb4243dc04f954930b09415dba9355b2f4c5f1b719eae62171f9 2023-01-30 01:42:34,335: DEBUG - ff512d411782cd025b5a8dcc0ddd098d78ca38b9630b568056ff21c48ea43511 2023-01-30 01:42:35,480: DEBUG - Executing command '['sh', '-c', '/bin/bash -x "./05-restic_app" backup /home/yunohost.backup/tmp/auto_my_webapp auto_my_webapp /home/yunohost.backup/archives 7287203 \'\' 7>&1']' 2023-01-30 01:42:35,484: DEBUG - + set -e 2023-01-30 01:42:35,485: DEBUG - ++ yunohost app setting restic server 2023-01-30 01:42:35,647: DEBUG - + RESTIC_SERVER=localhost 2023-01-30 01:42:35,648: DEBUG - ++ yunohost app setting restic port 2023-01-30 01:42:35,801: DEBUG - + RESTIC_SERVER_PORT=22 2023-01-30 01:42:35,801: DEBUG - ++ yunohost app setting restic ssh_user 2023-01-30 01:42:35,978: DEBUG - + RESTIC_SERVER_USER=root 2023-01-30 01:42:35,979: DEBUG - ++ yunohost app setting restic backup_path 2023-01-30 01:42:36,194: DEBUG - + RESTIC_PATH=/mnt/backups 2023-01-30 01:42:36,194: DEBUG - ++ yunohost app setting restic passphrase 2023-01-30 01:42:36,364: DEBUG - + RESTIC_PASSWORD=**** 2023-01-30 01:42:36,365: DEBUG - + RESTIC_REPOSITORY_BASE=sftp://root@localhost:22//mnt/backups/ 2023-01-30 01:42:36,365: DEBUG - + RESTIC_COMMAND=/usr/local/bin/restic 2023-01-30 01:42:36,365: DEBUG - + LOGFILE=/var/log/restic_backup_restic.log 2023-01-30 01:42:36,365: DEBUG - + ERRFILE=/var/log/restic_backup_restic.err 2023-01-30 01:42:36,365: DEBUG - + work_dir=/home/yunohost.backup/tmp/auto_my_webapp 2023-01-30 01:42:36,365: DEBUG - + name=auto_my_webapp 2023-01-30 01:42:36,365: DEBUG - + size=7287203 2023-01-30 01:42:36,365: DEBUG - + description= 2023-01-30 01:42:36,365: DEBUG - + case "$1" in 2023-01-30 01:42:36,365: DEBUG - + do_backup /home/yunohost.backup/tmp/auto_my_webapp auto_my_webapp 7287203 2023-01-30 01:42:36,365: DEBUG - + work_dir=/home/yunohost.backup/tmp/auto_my_webapp 2023-01-30 01:42:36,365: DEBUG - + name=auto_my_webapp 2023-01-30 01:42:36,365: DEBUG - + repo=7287203 2023-01-30 01:42:36,366: DEBUG - + size= 2023-01-30 01:42:36,366: DEBUG - + description= 2023-01-30 01:42:36,366: DEBUG - + export RESTIC_PASSWORD 2023-01-30 01:42:36,366: DEBUG - + export RESTIC_REPOSITORY=sftp://root@localhost:22//mnt/backups//auto_my_webapp 2023-01-30 01:42:36,366: DEBUG - + RESTIC_REPOSITORY=sftp://root@localhost:22//mnt/backups//auto_mywebapp 2023-01-30 01:42:36,366: DEBUG - ++ date +%d%m%y%H:%M 2023-01-30 01:42:36,366: DEBUG - + current_date=30_01_23_01:42 2023-01-30 01:42:36,366: DEBUG - + pushd /home/yunohost.backup/tmp/auto_my_webapp 2023-01-30 01:42:36,366: DEBUG - /home/yunohost.backup/tmp/auto_my_webapp /etc/yunohost/hooks.d/backup_method 2023-01-30 01:42:36,366: DEBUG - + /usr/local/bin/restic backup ./ 2023-01-30 01:42:36,367: DEBUG - ++ tee -a /var/log/restic_backup_restic.log 2023-01-30 01:42:36,367: DEBUG - ++ tee -a /var/log/restic_backup_restic.err 2023-01-30 01:42:36,368: WARNING - tee: /var/log/restic_backup_restic.err: Is a directory 2023-01-30 01:42:36,404: WARNING - subprocess ssh: Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts. 2023-01-30 01:42:36,990: WARNING - unable to open cache: unable to locate cache directory: neither $XDG_CACHE_HOME nor $HOME are defined 2023-01-30 01:43:02,205: WARNING - Fatal: load <index/060c134395>: invalid data returned 2023-01-30 01:43:03,208: ERROR - Could not run script: /etc/yunohost/hooks.d/backup_method/05-restic_app Traceback (most recent call last): File "/usr/lib/python3/dist-packages/yunohost/hook.py", line 305, in hook_callback hook_return = hook_exec( File "/usr/lib/python3/dist-packages/yunohost/hook.py", line 393, 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-restic_app