What app is this about, and its version: Borg backup 1.4.4
What YunoHost version are you running: 12.1.39
What type of hardware are you using: Old laptop or computer
Describe your issue
![]()
(en français en dessous)
It was a headhache for me with this backup settings.
Context :
I’ve got an old laptop that I use with Yunohost.
I wanna set up a backup process, by using another computer, that I will use as a backup server. This server is running Ubuntu.
First issue :
While defining my repository in the webadmin page, I has just followed the description for the entry :
(ssh://USER@DOMAIN.TLD:PORT/~/backup)
But instead of using a domain.tld, I’ve used an IP.
The problem is that the IP followed by the port (example : 192.168.10.10:22) is not recognized.
=> First fix : Remove the port in the repository.
Now, it is : ssh://USER@DOMAIN.TLD/~/backup or ssh://USER@xxx.yyy.zzz.aaa/~/backup
====
Second issue :
not concerning Borg app in Yunohost, but the version of Borg available through apt in
Ubuntu is a 1.2.8 …
=> Second fix : installation through PPA.
====
Third issue :
The known hosts in SSH are stored in a manner that the script didn’t recognize.
The script is testing like that :
ssh-keygen -F "[192.168.10.10]:22"
but the known hosts (thanks to the first issue) are stored like
192.168.10.10 keyVeryLong
=> Third fix : remove the ip from known_hosts, and add the same, with a sed, in order to add the port in the control.
# 1. Remove the entry for the IP
ssh-keygen -R 192.168.10.10
ssh-keygen -R "[192.168.10.10]:22"
# 2. Recreate those with the correct format :
ssh-keyscan -p 22 192.168.10.10 | sed 's/^192.168.10.10/[192.168.10.10]:22/' >> /root/.ssh/known_hosts
# 3. Control :
ssh-keygen -F "[192.168.10.10]:22"
=====
Fourth and final issue :
When BORG_RSH is loaded through the script, it’s value is not well transmitted to the borg binary.
I could create a repository on the Ubuntu server, using the BORG_RSH value explicitely in the command line, but the web admin page still says “repository uncreated”.
This BORG_RSH variable contains the key to be used for the credentials on the Borg server.
BORG_RSH="ssh -i /root/.ssh/id_borg_ed25519 -oStrictHostKeyChecking=no"
**=> Fourth fix :
On the line 8 of the script 05-borg_app I’ve added the BORG_RSH value, with an export. **
Share relevant logs or error messages
The logs are quite small, not updated frequently, especially when you’ve got an error.
And there is no timestamp on each line : quite difficult to identify what was wrong or not.
![]()
La configuration de cette sauvegarde a été épuisante !
Contexte :
Mon serveur Yunohost à sauvegardé tourne sur un vieil ordinateur.
J’ai un autre ordinateur, qui tourne sous Ubuntu, sur lequel je veux déposer les sauvegardes.
Mon premier problème a été que l’adresse ip du serveur, suivie du port de connexion n’était pas reconnue comme un service …
J’ai donc modifié mon repository pour ne pas inclure le port.
Mon second problème (qui ne concerne pas Yunohost, mais qui pourrait peut-être, faire l’objet d’une vérification) : la version distribuée dans Ubuntu (1.2.8) n’est pas la même version que celle disponible dans Yunohost (1.4.4) .
J’ai donc installé le PPA de BorgBackup et installé la version la plus récente (1.4.3)
Le troisième problème découle directement du premier : dans le script, il vérifie que l’adresse est déjà connue, en vérifiant que le serveur qui est bien enregistré contient le port.
ssh-keygen -F "[192.168.10.10]:22"
La correction a consisté en :
# 1. Supprimer les entrées existantes pour cette IP :
ssh-keygen -R 192.168.1.155
ssh-keygen -R "[192.168.1.155]:22"
# 2. Recréer avec le bon format explicitement :
ssh-keyscan -p 22 192.168.1.155 | sed 's/^192.168.1.155/[192.168.1.155]:22/' >> /root/.ssh/known_hosts
# 3. Vérifier :
ssh-keygen -F "[192.168.1.155]:22"
# → doit retourner des lignes cette fois
Et le dernier, le plus embêtant :
La variable BORG_RSH n’est pas correctement transmise au binaire borg.
J’ai donc modifié le script 05-borg_app pour ajouter un export à la ligne 8 de la variable BORG_RSH