[Restic] Backup with restic

Salut, suite à la procédure que j’ai postée pour la sauvegarde avec Restic, j’ai créé un package restic, ça serait cool si des gens pouvaient le tester et s’il pouvait être ajouté au catalogue en mode in progress :slight_smile:


[english version]
Hello, following the backup procedure with restic I posted earlier this week, I create a package.
It would be awesome if people were able to test it and if it could be added to the apps catalog with the in progress state :slight_smile:

3 Likes

I have made the PR on apps list for you, i have also forked into YunoHost-Apps organisation and give you right on the repo.

Thank you!

Ok so now my app passes the tests on the dev ci.
What’s next? I guess I wait for your pull request to be merged?

If you think it could be declared “working” instead of inprogress i can change that on the PR

Yes, that would be nice, thanks.

Your app has been included and tested on official ci : https://ci-apps.yunohost.org/ci/job/6254

Congratulations

That’s really cool.
I just read the contributor doc and saw that it was clearly explained how to get here.
Thank you for doing the job for me.

Now what I did not get is how to make the app appear on the APPS CI Dashboard.
Any hint on that?

Your app is already listed on https://ci-apps.yunohost.org/ci/ but not on dash.yunohost.org (maybe we need to do something to update data on it)

Yes that’s what I meant, https://ci-apps.yunohost.org/ci/ is refered to as Apps Continuous Integration and https://dash.yunohost.org/appci/branch/stable is referred to as Apps CI Dashboard in the contributor documentation.

Apparently that’s what’s missing for the app integration level badge link to work on the github repository

I think it’s a question of time to get the result from CI Apps to be include in the apps list…

Does restic’s backups always full or incremental?
I configured and made the first backup and it lasted for almost 24 hours.

Also noticed that restic created the backup folders on /tmp, but i defined the backup folder on /mnt/backups that is mounted on a S3 bucket

Is safe to delete these tmp folders and how prevent restic to create these folders again?

Also, how to do the restore with restic?

Restic backups incremental. My first backup lasted a few days, but now the everynight backup lasts about an hour or so.

Yes, restic is backing up daily and its incremental and fast.
So restic is using /tmp and is using a lot of space, i remember that on the setup it was declared a temp folder that restic could use, can i change this location and delete the files on /tmp?

@bleeh Hi, could you help me with my question?

Hey, I did not plan for it to be modified, an to be totally honest I never managed to make this temp space thing work as I wanted.

I have several restic releases to catch up with so I created an issue and I’ll take it into account for the next version of the package since it’s not complicated at all but I can’t tell you when that will be.

So, even if i uninstall and install and configure again, i can’t change the tmp dir?

I’ve restic making daily backups.

I’ve tried to restore one app (for testing purposes) and the info.json is not accepted from YNH backup system.

Please would anyone share how they restore backups? and/or any tip.

I take backup folder for the given app; make a .tar file; move it to /home/yunohost.backup/archives folder and then try to restore it (tried from command line and webinterface with the same result: json not valid)

I’ve copied app.json.info outside .tar file following what I see for other backups present in /home/yunohost.backup/archives folder. It does not work either

I’ve just tested using one app, I’ve tried with two different snapshots, with the same result.

Data is there, but YNH backup restore system does not accept

thank you

1 Like

Hi, you can check the “Restore from backup” section in this article I wrote when I published the app (I will add this section to the app documentation, … eventually)

Once you have restored the backup with restic you should be able to do a yunohost backup restore /path/to/restored/backup --apps app1,app2,...

2 Likes

I backup my yunohost server to an S3 storage bucket mounted on /mnt/backups, but since a few weeks it is giving errors on some apps, some are made the backup and some don’t.
Here is a log of one of the apps with error. Also i have installed new apps and they are backing up without error.

args:
apps:

  • my_webapp
    description: null
    dry_run: false
    methods:
  • restic_app
    name: auto_my_webapp
    output_directory: null
    system: null
    ended_at: 2023-02-16 12:58:51.710529
    error: Custom backup method could not get past the ‘backup’ step
    interface: cli
    operation: backup_create
    parent: null
    related_to:
    • app
    • my_webapp
      started_at: 2023-02-16 12:58:24.017935
      success: false
      yunohost_version: 11.1.6.2

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

2023-02-16 12:58:24,049: INFO - Collecting files to be backed up for my_webapp...
2023-02-16 12:58:24,064: DEBUG - Executing command '['sh', '-c', '/bin/bash -x "/var/cache/yunohost/app_tmp_work_dirs/app_jw4nsfc9/scripts/backup"  7>&1']'
2023-02-16 12:58:24,069: DEBUG - + source ../settings/scripts/_common.sh
2023-02-16 12:58:24,069: DEBUG - + source /usr/share/yunohost/helpers
2023-02-16 12:58:24,070: DEBUG - +++ set +o
2023-02-16 12:58:24,070: DEBUG - +++ grep xtrace
2023-02-16 12:58:24,071: DEBUG - ++ readonly 'XTRACE_ENABLE=set -o xtrace'
2023-02-16 12:58:24,071: DEBUG - ++ XTRACE_ENABLE='set -o xtrace'
2023-02-16 12:58:24,085: DEBUG - + ynh_abort_if_errors
2023-02-16 12:58:24,086: DEBUG - + trap ynh_exit_properly EXIT
2023-02-16 12:58:24,086: DEBUG - + ynh_print_info '--message=Loading installation settings...'
2023-02-16 12:58:24,095: INFO - Loading installation settings...
2023-02-16 12:58:24,096: DEBUG - + app=my_webapp
2023-02-16 12:58:24,096: DEBUG - ++ ynh_app_setting_get --app=my_webapp --key=final_path
2023-02-16 12:58:24,096: DEBUG - ++ local _globalapp=my_webapp
2023-02-16 12:58:24,121: DEBUG - ++ app=my_webapp
2023-02-16 12:58:24,121: DEBUG - ++ [[ final_path =~ (unprotected|protected|skipped)_ ]]
2023-02-16 12:58:24,121: DEBUG - ++ ynh_app_setting get my_webapp final_path
2023-02-16 12:58:24,161: DEBUG - + final_path=/var/www/my_webapp
2023-02-16 12:58:24,161: DEBUG - ++ ynh_app_setting_get --app=my_webapp --key=domain
2023-02-16 12:58:24,161: DEBUG - ++ local _globalapp=my_webapp
2023-02-16 12:58:24,182: DEBUG - ++ app=my_webapp
2023-02-16 12:58:24,182: DEBUG - ++ [[ domain =~ (unprotected|protected|skipped)_ ]]
2023-02-16 12:58:24,182: DEBUG - ++ ynh_app_setting get my_webapp domain
2023-02-16 12:58:24,225: DEBUG - + domain=domain2.tld
2023-02-16 12:58:24,226: DEBUG - ++ ynh_app_setting_get --app=my_webapp --key=db_name
2023-02-16 12:58:24,227: DEBUG - ++ local _globalapp=my_webapp
2023-02-16 12:58:24,245: DEBUG - ++ app=my_webapp
2023-02-16 12:58:24,245: DEBUG - ++ [[ db_name =~ (unprotected|protected|skipped)_ ]]
2023-02-16 12:58:24,246: DEBUG - ++ ynh_app_setting get my_webapp db_name
2023-02-16 12:58:24,285: DEBUG - + db_name=my_webapp
2023-02-16 12:58:24,285: DEBUG - ++ ynh_app_setting_get --app=my_webapp --key=with_mysql
2023-02-16 12:58:24,286: DEBUG - ++ local _globalapp=my_webapp
2023-02-16 12:58:24,315: DEBUG - ++ app=my_webapp
2023-02-16 12:58:24,315: DEBUG - ++ [[ with_mysql =~ (unprotected|protected|skipped)_ ]]
2023-02-16 12:58:24,315: DEBUG - ++ ynh_app_setting get my_webapp with_mysql
2023-02-16 12:58:24,370: DEBUG - + with_mysql=0
2023-02-16 12:58:24,371: DEBUG - ++ ynh_app_setting_get --app=my_webapp --key=with_sftp
2023-02-16 12:58:24,371: DEBUG - ++ local _globalapp=my_webapp
2023-02-16 12:58:24,403: DEBUG - ++ app=my_webapp
2023-02-16 12:58:24,403: DEBUG - ++ [[ with_sftp =~ (unprotected|protected|skipped)_ ]]
2023-02-16 12:58:24,404: DEBUG - ++ ynh_app_setting get my_webapp with_sftp
2023-02-16 12:58:24,456: DEBUG - + with_sftp=0
2023-02-16 12:58:24,456: DEBUG - ++ ynh_app_setting_get --app=my_webapp --key=phpversion
2023-02-16 12:58:24,456: DEBUG - ++ local _globalapp=my_webapp
2023-02-16 12:58:24,486: DEBUG - ++ app=my_webapp
2023-02-16 12:58:24,487: DEBUG - ++ [[ phpversion =~ (unprotected|protected|skipped)_ ]]
2023-02-16 12:58:24,487: DEBUG - ++ ynh_app_setting get my_webapp phpversion
2023-02-16 12:58:24,529: DEBUG - + phpversion=8.0
2023-02-16 12:58:24,529: DEBUG - + ynh_print_info '--message=Declaring files to be backed up...'
2023-02-16 12:58:24,540: INFO - Declaring files to be backed up...
2023-02-16 12:58:24,541: DEBUG - + ynh_backup --src_path=/var/www/my_webapp
2023-02-16 12:58:24,572: DEBUG - + dest_path=
2023-02-16 12:58:24,573: DEBUG - + is_big=0
2023-02-16 12:58:24,573: DEBUG - + not_mandatory=0
2023-02-16 12:58:24,573: DEBUG - + BACKUP_CORE_ONLY=0
2023-02-16 12:58:24,573: DEBUG - + test -n my_webapp
2023-02-16 12:58:24,573: DEBUG - ++ ynh_app_setting_get --app=my_webapp --key=do_not_backup_data
2023-02-16 12:58:24,573: DEBUG - ++ local _globalapp=my_webapp
2023-02-16 12:58:24,610: DEBUG - ++ app=my_webapp
2023-02-16 12:58:24,611: DEBUG - ++ [[ do_not_backup_data =~ (unprotected|protected|skipped)_ ]]
2023-02-16 12:58:24,611: DEBUG - ++ ynh_app_setting get my_webapp do_not_backup_data
2023-02-16 12:58:24,656: DEBUG - + do_not_backup_data=
2023-02-16 12:58:24,656: DEBUG - + '[' '!' -e /var/www/my_webapp ']'
2023-02-16 12:58:24,656: DEBUG - ++ realpath /var/www/my_webapp
2023-02-16 12:58:24,657: DEBUG - + src_path=/var/www/my_webapp
2023-02-16 12:58:24,657: DEBUG - + [[ -z '' ]]
2023-02-16 12:58:24,658: DEBUG - + dest_path=var/www/my_webapp
2023-02-16 12:58:24,658: DEBUG - + [[ -e var/www/my_webapp ]]
2023-02-16 12:58:24,658: DEBUG - + local rel_dir=/apps/my_webapp/backup
2023-02-16 12:58:24,658: DEBUG - + rel_dir=/apps/my_webapp/backup/
2023-02-16 12:58:24,658: DEBUG - + dest_path=/apps/my_webapp/backup/var/www/my_webapp
2023-02-16 12:58:24,658: DEBUG - + dest_path=apps/my_webapp/backup/var/www/my_webapp
2023-02-16 12:58:24,658: DEBUG - ++ echo /var/www/my_webapp
2023-02-16 12:58:24,658: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g'
2023-02-16 12:58:24,660: DEBUG - + local src=/var/www/my_webapp
2023-02-16 12:58:24,661: DEBUG - ++ echo apps/my_webapp/backup/var/www/my_webapp
2023-02-16 12:58:24,661: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g'
2023-02-16 12:58:24,663: DEBUG - + local dest=apps/my_webapp/backup/var/www/my_webapp
2023-02-16 12:58:24,664: DEBUG - ++ dirname /home/yunohost.backup/tmp/auto_my_webapp/apps/my_webapp/backup/var/www/my_webapp
2023-02-16 12:58:24,666: DEBUG - + mkdir --parents /home/yunohost.backup/tmp/auto_my_webapp/apps/my_webapp/backup/var/www
2023-02-16 12:58:24,668: DEBUG - + ynh_backup --src_path=/etc/nginx/conf.d/domain2.tld.d/my_webapp.conf
2023-02-16 12:58:24,703: DEBUG - + dest_path=
2023-02-16 12:58:24,703: DEBUG - + is_big=0
2023-02-16 12:58:24,703: DEBUG - + not_mandatory=0
2023-02-16 12:58:24,703: DEBUG - + BACKUP_CORE_ONLY=0
2023-02-16 12:58:24,704: DEBUG - + test -n my_webapp
2023-02-16 12:58:24,704: DEBUG - ++ ynh_app_setting_get --app=my_webapp --key=do_not_backup_data
2023-02-16 12:58:24,704: DEBUG - ++ local _globalapp=my_webapp
2023-02-16 12:58:24,736: DEBUG - ++ app=my_webapp
2023-02-16 12:58:24,736: DEBUG - ++ [[ do_not_backup_data =~ (unprotected|protected|skipped)_ ]]
2023-02-16 12:58:24,737: DEBUG - ++ ynh_app_setting get my_webapp do_not_backup_data
2023-02-16 12:58:24,784: DEBUG - + do_not_backup_data=
2023-02-16 12:58:24,784: DEBUG - + '[' '!' -e /etc/nginx/conf.d/domain2.tld.d/my_webapp.conf ']'
2023-02-16 12:58:24,785: DEBUG - ++ realpath /etc/nginx/conf.d/domain2.tld.d/my_webapp.conf
2023-02-16 12:58:24,787: DEBUG - + src_path=/etc/nginx/conf.d/domain2.tld.d/my_webapp.conf
2023-02-16 12:58:24,787: DEBUG - + [[ -z '' ]]
2023-02-16 12:58:24,787: DEBUG - + dest_path=etc/nginx/conf.d/domain2.tld.d/my_webapp.conf
2023-02-16 12:58:24,787: DEBUG - + [[ -e etc/nginx/conf.d/domain2.tld.d/my_webapp.conf ]]
2023-02-16 12:58:24,787: DEBUG - + local rel_dir=/apps/my_webapp/backup
2023-02-16 12:58:24,787: DEBUG - + rel_dir=/apps/my_webapp/backup/
2023-02-16 12:58:24,788: DEBUG - + dest_path=/apps/my_webapp/backup/etc/nginx/conf.d/domain2.tld.d/my_webapp.conf
2023-02-16 12:58:24,788: DEBUG - + dest_path=apps/my_webapp/backup/etc/nginx/conf.d/domain2.tld.d/my_webapp.conf
2023-02-16 12:58:24,788: DEBUG - ++ echo /etc/nginx/conf.d/domain2.tld.d/my_webapp.conf
2023-02-16 12:58:24,788: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g'
2023-02-16 12:58:24,792: DEBUG - + local src=/etc/nginx/conf.d/domain2.tld.d/my_webapp.conf
2023-02-16 12:58:24,792: DEBUG - ++ echo apps/my_webapp/backup/etc/nginx/conf.d/domain2.tld.d/my_webapp.conf
2023-02-16 12:58:24,792: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g'
2023-02-16 12:58:24,798: DEBUG - + local dest=apps/my_webapp/backup/etc/nginx/conf.d/domain2.tld.d/my_webapp.conf
2023-02-16 12:58:24,799: DEBUG - ++ dirname /home/yunohost.backup/tmp/auto_my_webapp/apps/my_webapp/backup/etc/nginx/conf.d/domain2.tld.d/my_webapp.conf
2023-02-16 12:58:24,800: DEBUG - + mkdir --parents /home/yunohost.backup/tmp/auto_my_webapp/apps/my_webapp/backup/etc/nginx/conf.d/domain2.tld.d
2023-02-16 12:58:24,803: DEBUG - + '[' 8.0 '!=' none ']'
2023-02-16 12:58:24,803: DEBUG - + ynh_backup --src_path=/etc/php/8.0/fpm/pool.d/my_webapp.conf
2023-02-16 12:58:24,839: DEBUG - + dest_path=
2023-02-16 12:58:24,839: DEBUG - + is_big=0
2023-02-16 12:58:24,839: DEBUG - + not_mandatory=0
2023-02-16 12:58:24,839: DEBUG - + BACKUP_CORE_ONLY=0
2023-02-16 12:58:24,839: DEBUG - + test -n my_webapp
2023-02-16 12:58:24,839: DEBUG - ++ ynh_app_setting_get --app=my_webapp --key=do_not_backup_data
2023-02-16 12:58:24,840: DEBUG - ++ local _globalapp=my_webapp
2023-02-16 12:58:24,873: DEBUG - ++ app=my_webapp
2023-02-16 12:58:24,874: DEBUG - ++ [[ do_not_backup_data =~ (unprotected|protected|skipped)_ ]]
2023-02-16 12:58:24,874: DEBUG - ++ ynh_app_setting get my_webapp do_not_backup_data
2023-02-16 12:58:24,930: DEBUG - + do_not_backup_data=
2023-02-16 12:58:24,930: DEBUG - + '[' '!' -e /etc/php/8.0/fpm/pool.d/my_webapp.conf ']'
2023-02-16 12:58:24,930: DEBUG - ++ realpath /etc/php/8.0/fpm/pool.d/my_webapp.conf
2023-02-16 12:58:24,932: DEBUG - + src_path=/etc/php/8.0/fpm/pool.d/my_webapp.conf
2023-02-16 12:58:24,932: DEBUG - + [[ -z '' ]]
2023-02-16 12:58:24,932: DEBUG - + dest_path=etc/php/8.0/fpm/pool.d/my_webapp.conf
2023-02-16 12:58:24,932: DEBUG - + [[ -e etc/php/8.0/fpm/pool.d/my_webapp.conf ]]
2023-02-16 12:58:24,932: DEBUG - + local rel_dir=/apps/my_webapp/backup
2023-02-16 12:58:24,932: DEBUG - + rel_dir=/apps/my_webapp/backup/
2023-02-16 12:58:24,932: DEBUG - + dest_path=/apps/my_webapp/backup/etc/php/8.0/fpm/pool.d/my_webapp.conf
2023-02-16 12:58:24,932: DEBUG - + dest_path=apps/my_webapp/backup/etc/php/8.0/fpm/pool.d/my_webapp.conf
2023-02-16 12:58:24,932: DEBUG - ++ echo /etc/php/8.0/fpm/pool.d/my_webapp.conf
2023-02-16 12:58:24,933: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g'
2023-02-16 12:58:24,935: DEBUG - + local src=/etc/php/8.0/fpm/pool.d/my_webapp.conf
2023-02-16 12:58:24,935: DEBUG - ++ echo apps/my_webapp/backup/etc/php/8.0/fpm/pool.d/my_webapp.conf
2023-02-16 12:58:24,936: DEBUG - ++ sed --regexp-extended 's/"/\"\"/g'
2023-02-16 12:58:24,938: DEBUG - + local dest=apps/my_webapp/backup/etc/php/8.0/fpm/pool.d/my_webapp.conf
2023-02-16 12:58:24,938: DEBUG - ++ dirname /home/yunohost.backup/tmp/auto_my_webapp/apps/my_webapp/backup/etc/php/8.0/fpm/pool.d/my_webapp.conf
2023-02-16 12:58:24,939: DEBUG - + mkdir --parents /home/yunohost.backup/tmp/auto_my_webapp/apps/my_webapp/backup/etc/php/8.0/fpm/pool.d
2023-02-16 12:58:24,941: DEBUG - + ynh_print_info '--message=Backup script completed for my_webapp. (YunoHost will then actually copy those files to the archive).'
2023-02-16 12:58:24,950: INFO - Backup script completed for my_webapp. (YunoHost will then actually copy those files to the archive).
2023-02-16 12:58:24,951: DEBUG - + ynh_exit_properly
2023-02-16 12:58:25,953: DEBUG - Backup permission for my_webapp
2023-02-16 12:58:26,001: DEBUG - initializing ldap interface
2023-02-16 12:58:26,073: INFO - Creating a backup archive from the collected files...
2023-02-16 12:58:26,074: INFO - The archive will contain about 6.9MB of data.
2023-02-16 12:58:26,075: DEBUG - Calling the custom backup method '{method}'...
2023-02-16 12:58:26,075: 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-02-16 12:58:26,082: DEBUG - + set -e
2023-02-16 12:58:26,082: DEBUG - ++ yunohost app setting restic server
2023-02-16 12:58:26,302: DEBUG - + RESTIC_SERVER=localhost
2023-02-16 12:58:26,303: DEBUG - ++ yunohost app setting restic port
2023-02-16 12:58:26,479: DEBUG - + RESTIC_SERVER_PORT=22
2023-02-16 12:58:26,479: DEBUG - ++ yunohost app setting restic ssh_user
2023-02-16 12:58:26,700: DEBUG - + RESTIC_SERVER_USER=root
2023-02-16 12:58:26,700: DEBUG - ++ yunohost app setting restic backup_path
2023-02-16 12:58:26,865: DEBUG - + RESTIC_PATH=/mnt/backups
2023-02-16 12:58:26,866: DEBUG - ++ yunohost app setting restic passphrase
2023-02-16 12:58:27,049: DEBUG - + RESTIC_PASSWORD=***************
2023-02-16 12:58:27,049: DEBUG - + RESTIC_REPOSITORY_BASE=sftp://root@localhost:22//mnt/backups/
2023-02-16 12:58:27,049: DEBUG - + RESTIC_COMMAND=/usr/local/bin/restic
2023-02-16 12:58:27,049: DEBUG - + LOGFILE=/var/log/restic_backup_restic.log
2023-02-16 12:58:27,049: DEBUG - + ERRFILE=/var/log/restic_backup_restic.err
2023-02-16 12:58:27,050: DEBUG - + work_dir=/home/yunohost.backup/tmp/auto_my_webapp
2023-02-16 12:58:27,050: DEBUG - + name=auto_my_webapp
2023-02-16 12:58:27,050: DEBUG - + size=7287203
2023-02-16 12:58:27,050: DEBUG - + description=
2023-02-16 12:58:27,050: DEBUG - + case "$1" in
2023-02-16 12:58:27,050: DEBUG - + do_need_mount /home/yunohost.backup/tmp/auto_my_webapp auto_my_webapp 7287203
2023-02-16 12:58:27,050: DEBUG - + work_dir=/home/yunohost.backup/tmp/auto_my_webapp
2023-02-16 12:58:27,050: DEBUG - + name=auto_my_webapp
2023-02-16 12:58:27,050: DEBUG - + repo=7287203
2023-02-16 12:58:27,050: DEBUG - + size=
2023-02-16 12:58:27,050: DEBUG - + description=
2023-02-16 12:58:27,050: DEBUG - + export RESTIC_PASSWORD
2023-02-16 12:58:27,050: DEBUG - + export RESTIC_REPOSITORY=sftp://root@localhost:22//mnt/backups//auto_my_webapp
2023-02-16 12:58:27,050: DEBUG - + RESTIC_REPOSITORY=sftp://root@localhost:22//mnt/backups//auto_my_webapp
2023-02-16 12:58:27,050: DEBUG - + /usr/local/bin/restic list snapshots
2023-02-16 12:58:27,051: DEBUG - ++ tee -a /var/log/restic_backup_restic.log
2023-02-16 12:58:27,051: DEBUG - ++ tee -a /var/log/restic_backup_restic.err
2023-02-16 12:58:27,051: WARNING - tee: /var/log/restic_backup_restic.err: Is a directory
2023-02-16 12:58:27,083: WARNING - subprocess ssh: Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
2023-02-16 12:58:28,111: WARNING - unable to open cache: unable to locate cache directory: neither $XDG_CACHE_HOME nor $HOME are defined
2023-02-16 12:58:32,026: DEBUG - 0d6a96cac907351c662b31dbb9989fdffc5f97f1c768dc2c4f4d57131d77d5db
2023-02-16 12:58:32,027: DEBUG - 11770206f8a867619e64570536b1549b4ecd468997d2ea47e1e7af3936c549b4
2023-02-16 12:58:32,027: DEBUG - 124dbe59be5961ebb14aaedc35fa617eb6adbf6d2bb33b135844b463e95ff151
2023-02-16 12:58:32,027: DEBUG - 1798c25bce00867ff50638121970ad14a7e6ba4051e111d2c93dfb48c30f93fb
2023-02-16 12:58:32,027: DEBUG - 361e4d1962a221788672db4cc82136eb8d5ca736aaa10c70a3d6aefa6e0084f3
2023-02-16 12:58:32,027: DEBUG - 3798db78c607650882bb29d6e90c977d3b542b911a4a815ee5a1f8c6f98aefc9
2023-02-16 12:58:32,027: DEBUG - 3aef01ba13061ed0bffbd4b289b9459a3e86e12079821352a3036d6d6e439c07
2023-02-16 12:58:32,027: DEBUG - 5c08e5435eda603035cc96e6e9d02ac1e708a80335d4b4175f0071d423ed44cc
2023-02-16 12:58:32,027: DEBUG - 6809f0bd0d0be5bf9aa2bbf526a0810968852058e23c54f57d77de44259122ff
2023-02-16 12:58:32,028: DEBUG - 7406cf62acd58a61096e07c6475d0804231c33e9198c985e6330340db0a9e2ba
2023-02-16 12:58:32,028: DEBUG - 79b2829e85aa074fa813e955eec44cf8f334a034c0ebb1a84aa9e9d49777a064
2023-02-16 12:58:32,028: DEBUG - 9e6bac2f6e4550d9275ab0ed7d53fed7f4fcdffd1cc7776516d2034d99c2c344
2023-02-16 12:58:32,028: DEBUG - a11457b5151315364e02acfba95ab5120d67e0d23485ef33d9d9a28d9b5c121f
2023-02-16 12:58:32,028: DEBUG - abe320d736a72b12867ea5421d7d1f8880f7f949844fe255ee55180b216ad804
2023-02-16 12:58:32,028: DEBUG - c2eee4bc1491f538542c4f5caba66cf5dae9ce35c4058b1e28114f1b4d28b047
2023-02-16 12:58:32,028: DEBUG - ce95e37c377fcacd77c3aeb1a8c5769f7f43b51641c58a8b21b057d8d5776396
2023-02-16 12:58:32,028: DEBUG - cf18a59e0ec26b64c297772542264e8034bf3429d1faea1f5498ce02a7545d99
2023-02-16 12:58:32,028: DEBUG - cf53253d127697f5958241a4cc921c90952f99926cab8ddbd930c879e6e5c2bf
2023-02-16 12:58:32,028: DEBUG - d8adca47a53e7f21c5512d78337fefa4c12376e6f8d3ab5c69bd6d9f2b38f18b
2023-02-16 12:58:32,028: DEBUG - db63c7397c19a47f00e3034cf679b37b04b36ec9bd3ecb7199ac904b5f23cc11
2023-02-16 12:58:32,028: DEBUG - f7a675094eaecb4243dc04f954930b09415dba9355b2f4c5f1b719eae62171f9
2023-02-16 12:58:32,028: DEBUG - ff512d411782cd025b5a8dcc0ddd098d78ca38b9630b568056ff21c48ea43511
2023-02-16 12:58:33,329: 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-02-16 12:58:33,335: DEBUG - + set -e
2023-02-16 12:58:33,336: DEBUG - ++ yunohost app setting restic server
2023-02-16 12:58:33,529: DEBUG - + RESTIC_SERVER=localhost
2023-02-16 12:58:33,530: DEBUG - ++ yunohost app setting restic port
2023-02-16 12:58:33,717: DEBUG - + RESTIC_SERVER_PORT=22
2023-02-16 12:58:33,717: DEBUG - ++ yunohost app setting restic ssh_user
2023-02-16 12:58:33,911: DEBUG - + RESTIC_SERVER_USER=root
2023-02-16 12:58:33,911: DEBUG - ++ yunohost app setting restic backup_path
2023-02-16 12:58:34,111: DEBUG - + RESTIC_PATH=/mnt/backups
2023-02-16 12:58:34,111: DEBUG - ++ yunohost app setting restic passphrase
2023-02-16 12:58:34,323: DEBUG - + RESTIC_PASSWORD=****************
2023-02-16 12:58:34,324: DEBUG - + RESTIC_REPOSITORY_BASE=sftp://root@localhost:22//mnt/backups/
2023-02-16 12:58:34,324: DEBUG - + RESTIC_COMMAND=/usr/local/bin/restic
2023-02-16 12:58:34,324: DEBUG - + LOGFILE=/var/log/restic_backup_restic.log
2023-02-16 12:58:34,324: DEBUG - + ERRFILE=/var/log/restic_backup_restic.err
2023-02-16 12:58:34,324: DEBUG - + work_dir=/home/yunohost.backup/tmp/auto_my_webapp
2023-02-16 12:58:34,324: DEBUG - + name=auto_my_webapp
2023-02-16 12:58:34,324: DEBUG - + size=7287203
2023-02-16 12:58:34,324: DEBUG - + description=
2023-02-16 12:58:34,324: DEBUG - + case "$1" in
2023-02-16 12:58:34,324: DEBUG - + do_backup /home/yunohost.backup/tmp/auto_my_webapp auto_my_webapp 7287203
2023-02-16 12:58:34,324: DEBUG - + work_dir=/home/yunohost.backup/tmp/auto_my_webapp
2023-02-16 12:58:34,324: DEBUG - + name=auto_my_webapp
2023-02-16 12:58:34,325: DEBUG - + repo=7287203
2023-02-16 12:58:34,325: DEBUG - + size=
2023-02-16 12:58:34,325: DEBUG - + description=
2023-02-16 12:58:34,325: DEBUG - + export RESTIC_PASSWORD
2023-02-16 12:58:34,325: DEBUG - + export RESTIC_REPOSITORY=sftp://root@localhost:22//mnt/backups//auto_my_webapp
2023-02-16 12:58:34,325: DEBUG - + RESTIC_REPOSITORY=sftp://root@localhost:22//mnt/backups//auto_my_webapp
2023-02-16 12:58:34,325: DEBUG - ++ date +%d_%m_%y_%H:%M
2023-02-16 12:58:34,325: DEBUG - + current_date=16_02_23_12:58
2023-02-16 12:58:34,325: DEBUG - + pushd /home/yunohost.backup/tmp/auto_my_webapp
2023-02-16 12:58:34,325: DEBUG - /home/yunohost.backup/tmp/auto_my_webapp /etc/yunohost/hooks.d/backup_method
2023-02-16 12:58:34,325: DEBUG - + /usr/local/bin/restic backup ./
2023-02-16 12:58:34,327: DEBUG - ++ tee -a /var/log/restic_backup_restic.log
2023-02-16 12:58:34,328: DEBUG - ++ tee -a /var/log/restic_backup_restic.err
2023-02-16 12:58:34,329: WARNING - tee: /var/log/restic_backup_restic.err: Is a directory
2023-02-16 12:58:34,362: WARNING - subprocess ssh: Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
2023-02-16 12:58:35,048: WARNING - unable to open cache: unable to locate cache directory: neither $XDG_CACHE_HOME nor $HOME are defined
2023-02-16 12:58:50,694: WARNING - Fatal: load <index/060c134395>: invalid data returned
2023-02-16 12:58:51,695: 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 298, in hook_callback
    hook_return = hook_exec(
  File "/usr/lib/python3/dist-packages/yunohost/hook.py", line 385, 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