Mes serveurs YunoHost
Matériel: Deux VPS en ligne
Version de YunoHost: :
# yunohost --version
yunohost:
repo: stable
version: 12.1.31
Accès aux serveurs: La webadmin et SSH
Contexte spécial ?: Borg upgrade en 1.4.1~ynh5
Description du problème
J’ai fait la mise à jour en vérifiant bien ce qui est indiqué sur Borg 1.4.1~ynh4 released, what you should check after the upgrade. J’ai bien un “&” dans mes passphrases mais les backups ont été initialisés avec la passphrase complète et la configuration dans /var/www/borg/.env est bonne.
Après la mise à jour sur les deux serveurs :
# yunohost app shell borg
borg@serverA:~$ borg list
Got unexpected RPC data format from server:
usage: borg [-V] [-h] [--critical] [--error] [--warning] [--info] [--debug]
[--debug-topic TOPIC] [-p] [--iec] [--lo
Sur les deux serveurs, la version est bien 1.4.1 :
# yunohost app shell borg
borg@serverA:~$ borg -V
borg 1.4.1
# yunohost app list
apps:
0:
description: Regularly create deduplicated, encrypted backups sent to another server using Borg
id: borg
name: Borg Backup vers Quercus
version: 1.4.1~ynh5
1:
description: Offer backup storage to a friend
id: borgserver
name: Borg Server pour Quercus
version: 1.4.1~ynh1
(...)
Quand j’essaye de faire un backup, j’ai ces logs :
# cat 251023_0814.log | less
(...)
INFO Collecting files to be backed up for my_webapp…
INFO Declaring files to be backed up...
INFO Backup script completed for my_webapp. (YunoHost will then actually copy those files to the archive).
INFO Creating a backup archive from the collected files…
INFO The archive will contain about 9.9MB of data.
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 20251023-081648-backup_create' to get help
(...)
# yunohost log share 20251023-081648-backup_create
Success! This log is now available via https://paste.yunohost.org/raw/ziqodopido
Si on va sur le pad, on voit qu’il ne voit pas les backups existants et qu’il cherche à créer un nouveau backup :
2025-10-23 08:16:54,263: DEBUG - + /var/www/borg/venv/bin/borg list
2025-10-23 08:16:58,679: DEBUG - + /var/www/borg/venv/bin/borg init -e repokey
(...)
2025-10-23 08:17:02,898: DEBUG - Your first backup on ssh://userA@serverB:PORT/~/backup is starting.
Et ça merdouille…
2025-10-23 08:17:03,043: DEBUG - /home/yunohost.backup/tmp/auto_my_webapp /etc/yunohost/hooks.d/backup_method
2025-10-23 08:17:03,044: DEBUG - + /var/www/borg/venv/bin/borg create --exclude-if-present .nobackup --stats '::auto_my_webapp-{now}' .
2025-10-23 08:17:07,044: WARNING - Remote: Local Exception
2025-10-23 08:17:07,047: WARNING - Remote: Traceback (most recent call last):
2025-10-23 08:17:07,052: WARNING - Remote: File "/var/www/borgserver/venv/lib/python3.11/site-packages/borg/archiver.py", line 5442, in main
2025-10-23 08:17:07,056: WARNING - Remote: args = archiver.get_args(sys.argv, os.environ.get('SSH_ORIGINAL_COMMAND'))
2025-10-23 08:17:07,058: WARNING - Remote: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-10-23 08:17:07,060: WARNING - Remote: File "/var/www/borgserver/venv/lib/python3.11/site-packages/borg/archiver.py", line 5244, in get_args
2025-10-23 08:17:07,062: WARNING - Remote: if client_result.func == result.func:
2025-10-23 08:17:07,064: WARNING - Remote: ^^^^^^^^^^^^^^^^^^
2025-10-23 08:17:07,067: WARNING - Remote: AttributeError: 'Namespace' object has no attribute 'func'
2025-10-23 08:17:07,069: WARNING - Remote:
2025-10-23 08:17:07,077: WARNING - Remote: Platform: Linux artanux.be 4.19.62-mod-std-ipv6-64-rescue #828825 SMP Tue Jul 30 13:54:49 UTC 2019 x86_64
2025-10-23 08:17:07,079: WARNING - Remote: Linux: Unknown Linux
2025-10-23 08:17:07,081: WARNING - Remote: Borg: 1.4.1 Python: CPython 3.11.2 msgpack: 1.1.0 fuse: pyfuse3 3.4.0 [pyfuse3,llfuse]
2025-10-23 08:17:07,083: WARNING - Remote: PID: 1901519 CWD: /home/quercus
2025-10-23 08:17:07,085: WARNING - Remote: sys.argv: ['/var/www/borgserver/venv/bin/borg', 'serve', '--storage-quota', '500G', '--restrict-to-repository', '/home/quercus/backup']
2025-10-23 08:17:07,087: WARNING - Remote: SSH_ORIGINAL_COMMAND: ' serve --debug'
2025-10-23 08:17:07,091: WARNING - Remote:
2025-10-23 08:17:07,523: DEBUG - + retcode=2
2025-10-23 08:17:07,524: DEBUG - + popd
2025-10-23 08:17:07,524: DEBUG - /etc/yunohost/hooks.d/backup_method
2025-10-23 08:17:07,525: DEBUG - + [[ 2 == 1 ]]
2025-10-23 08:17:07,525: DEBUG - + [[ 2 != 0 ]]
2025-10-23 08:17:07,526: DEBUG - + exit 2
2025-10-23 08:17:07,628: 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 302, in hook_callback
hook_return = hook_exec(
^^^^^^^^^^
File "/usr/lib/python3/dist-packages/yunohost/hook.py", line 428, 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
(On retrouve la même erreur dans /var/log/borg/251023_0814.err)
Un truc que je vois, c’est que “BORG_REMOTE_PATH” n’est pas configuré. Est-ce que ça pourrait expliquer le problème ?