Systemctl start restic fails

What type of hardware are you using: Virtual machine
What YunoHost version are you running: 12.0.12
What app is this about: Restic

Describe your issue

When running systemctl start restic error occurs

Share relevant logs or error messages

LOGFILE: journalctl
Mar 27 17:39:11 backup-with-restic[3992]:   File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
Mar 27 17:39:11 backup-with-restic[3992]: WARNING /var/www/restic/restic: line 1: BZh91AY: command not found
Mar 27 17:39:11 backup-with-restic[3992]:     self.run()
Mar 27 17:39:11 backup-with-restic[3992]:   File "/usr/lib/python3/dist-packages/moulinette/utils/process.py", line 150, in run
Mar 27 17:39:11 backup-with-restic[3992]:     self.queue.put((self.log_callback, line.decode("utf-8").strip("\n")))
Mar 27 17:39:11 backup-with-restic[3992]:                                        ^^^^^^^^^^^^^^^^^^^^
Mar 27 17:39:11 backup-with-restic[3992]: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 41: invalid start byte
Mar 27 17:39:12 backup-with-restic[3992]: ERROR Could not run script: /etc/yunohost/hooks.d/backup_method/05-restic_app
Mar 27 17:39:12 backup-with-restic[3992]: 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 20250327-173909-backup_create' to get help
Mar 27 17:39:12 backup-with-restic[3992]: ERROR Custom backup method could not get past the 'backup' step
Mar 27 17:39:12 sudo[3991]: pam_unix(sudo:session): session closed for user root
Mar 27 17:39:12 sudo[5050]:   restic : PWD=/ ; USER=root ; COMMAND=/usr/bin/yunohost backup create -n auto_stremio --method restic_app --apps stremio
Mar 27 17:39:12 sudo[5050]: pam_limits(sudo:session): Could not set limit for 'core' to soft=0, hard=-1: Operation not permitted; uid=990,euid=0
Mar 27 17:39:12 sudo[5050]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=990)
Mar 27 17:39:12 backup-with-restic[5051]: INFO Collecting files to be backed up for stremio…
Mar 27 17:39:12 backup-with-restic[5051]: INFO Declaring files to be backed up...
Mar 27 17:39:12 backup-with-restic[5051]: INFO Backup script completed for stremio. (YunoHost will then actually copy those files to the archive).
Mar 27 17:39:12 backup-with-restic[5051]: INFO Creating a backup archive from the collected files…
Mar 27 17:39:12 backup-with-restic[5051]: INFO The archive will contain about 19.1MB of data.
Mar 27 17:39:13 backup-with-restic[5051]: WARNING tee: /var/log/restic_backup_restic.err: Is a directory
Mar 27 17:39:13 backup-with-restic[5051]: Exception in thread Thread-5:
Mar 27 17:39:13 backup-with-restic[5051]: WARNING /var/www/restic/restic: line 1: BZh91AY: command not found
Mar 27 17:39:13 backup-with-restic[5051]: Traceback (most recent call last):
Mar 27 17:39:13 backup-with-restic[5051]:   File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
Mar 27 17:39:13 backup-with-restic[5051]:     self.run()
Mar 27 17:39:13 backup-with-restic[5051]:   File "/usr/lib/python3/dist-packages/moulinette/utils/process.py", line 150, in run
Mar 27 17:39:13 backup-with-restic[5051]:     self.queue.put((self.log_callback, line.decode("utf-8").strip("\n")))
Mar 27 17:39:13 backup-with-restic[5051]:                                        ^^^^^^^^^^^^^^^^^^^^
Mar 27 17:39:13 backup-with-restic[5051]: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 41: invalid start byte
Mar 27 17:39:13 backup-with-restic[5051]: ERROR Could not run script: /etc/yunohost/hooks.d/backup_method/05-restic_app
Mar 27 17:39:14 backup-with-restic[5051]: WARNING tee: /var/log/restic_backup_restic.err: Is a directory
Mar 27 17:39:14 backup-with-restic[5051]: Exception in thread Thread-8:
Mar 27 17:39:14 backup-with-restic[5051]: Traceback (most recent call last):
Mar 27 17:39:14 backup-with-restic[5051]: WARNING /var/www/restic/restic: line 1: BZh91AY: command not found
Mar 27 17:39:14 backup-with-restic[5051]:   File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
Mar 27 17:39:14 backup-with-restic[5051]:     self.run()
Mar 27 17:39:14 backup-with-restic[5051]:   File "/usr/lib/python3/dist-packages/moulinette/utils/process.py", line 150, in run
Mar 27 17:39:14 backup-with-restic[5051]:     self.queue.put((self.log_callback, line.decode("utf-8").strip("\n")))
Mar 27 17:39:14 backup-with-restic[5051]:                                        ^^^^^^^^^^^^^^^^^^^^
Mar 27 17:39:14 backup-with-restic[5051]: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 41: invalid start byte
Mar 27 17:39:14 backup-with-restic[5051]: ERROR Could not run script: /etc/yunohost/hooks.d/backup_method/05-restic_app
Mar 27 17:39:14 backup-with-restic[5051]: 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 20250327-173912-backup_create' to get help
Mar 27 17:39:14 backup-with-restic[5051]: ERROR Custom backup method could not get past the 'backup' step
Mar 27 17:39:14 sudo[5050]: pam_unix(sudo:session): session closed for user root
Mar 27 17:39:14 (g_restic)[5216]: restic.service: Failed to locate executable /var/www/restic/restic_log_restic: No such file or directory
Mar 27 17:39:14 (g_restic)[5216]: restic.service: Failed at step EXEC spawning /var/www/restic/restic_log_restic: No such file or directory
Mar 27 17:39:14 systemd[1]: restic.service: Control process exited, code=exited, status=203/EXEC
Mar 27 17:39:14 systemd[1]: restic.service: Failed with result 'exit-code'.
Mar 27 17:39:14 systemd[1]: Failed to start restic.service - Run backup restic.
Mar 27 17:39:14 systemd[1]: restic.service: Consumed 17.338s CPU time.

I think I did manage to fix it by running bunzip2 /var/www/restic/restic.

Apparently the file was compressed? Why I don’t know. I don’t think this is indended and probably is a bug.