Bonsoir,
j'ai quelques question à propos de la configuration et de l'utilisation de cyborgbackup.
J'ai procédé à l'installation de cyberbackup sur une machine physique sous ubuntu 20.04 en utilisant la méthode docker et l'installation est pleinement fonctionnelle.
J'ai accès à l'API et à l'UI.
L'ip de ma machine physique est "192.168.1.100", le hostname est "saveborg" et les noms des utilisateurs de cette machine sont "root" et"masterbalby".
Le but de l'opération est de sauvegarder le répertoire "/etc" de ma machine physique dans un repo BORG situé sur la meme machine dans "/home/masterbalby/BORG".
Si j'ai bien compris le fonctionnement de cyborgbackup le process est le suivant pour créer une nouvelle sauvegarde :
- je renseigne la page setup
- je crée un repo
- j'ajoute un client (la machine à sauvegarder)
- je crée un schedule
- et pour finir je crée le policy
- je lance ensuite le policy est normalement la sauvegarde s'effectue.
Mais voila ça ne se passe pas comme prévu...
Tout d'abord l'étape 1 :
Quelles sont les champs obligatoires dans mon cas ?
J'ai renseigné le champs "Ssh password" par mon mot de passe (qui est le meme pour l'utilisateur "root" et "masterbalby").
A quoi servent les champs "Ssh Key" et "Url" ?
Sont-ils importants ?
Ensuite l'étape 2 :
Je remplis de la manière suivante la page "Add Repository":
- champs "Name" : test_repo
- champs "Path" : [email protected]:/home/masterbalby/BORG
- champs "Repository Key" : ABCD123456
- je sélectionne "Enabled"
- pour finir je clique sur "SAVE"
Le problème est que rien ne se passe dans "/home/masterbalby/BORG", aucune création de repo.
J'ai vu sur le wiki que le repo était créé par le script "prepare_repository".
J'ai donc inspecté le script et ai remarqué que le script recherchait d'abord si curl et borg étaient présents dans le container api. Par défaut curl est présent mais pas borg. Le script essaye alors de télécharger borg sur le github de borgbackup.
Mais une erreur (je crois) dans le script empèche le téléchargement.
Voici la ligne en cause (la 11) :
binary=$(curl -sL $ttps://api.github.com/repos/borgbackup/borg/releases/latest | grep "browser_download_url" | grep 'borg-linux64"' | cut -d : -f 2,3 | tr -d \")
Si on enlève le " juste après borg-linux64 le script arrive désormais à télécharger borg et à l'installer.
Voici la ligne 11 modifiée :
binary=$(curl -sL $ttps://api.github.com/repos/borgbackup/borg/releases/latest | grep "browser_download_url" | grep 'borg-linux64' | cut -d : -f 2,3 | tr -d \")
De cette manière borg peut s'installer dans le container.
Malheureusement si je recrée le repo il ne sa passe toujours rien.
Est-ce que lorsque l'on click sur "SAVE" le repo est créé tout de suite ?
Etape 3 :
Je remplis de la manière suivante la page "add client":
- champs "Hostname" : "saveborg"
- je séléctionne "enabled"
- et je valide avec "SAVE"
D'après la doc l'IP et la version de borg du client sont renseignés par le script "preparation_client".
Mais de la meme manière que à l'etape 2 rien ne se passe.
Je ne suis pas encore passé aux étapes suivantes. Je préfère d'abord arriver à créer mon repo et à configurer le client.
N'arrivant pas à effectuer ces étapes j'ai essayé de créer le repo et le client à partir de l'API.
J'arrive à renseigner les deux formulaires mais le repo ne se crée toujours pas et pour le client je renseigne son adresse IP et une fois validé, dans la liste des clients le client apparait sans adresse IP.
Voila j'en ai terminé pour ce soir.
Je sais que ce post est assez long mais j'ai essayé d'être le plus clair possible.
Par avance merci beaucoup pour l'aide que vous pourrez m'apporter.
Good evening,
I have some questions about configuring and using cyborgbackup.
I proceeded to install cyborgbackup on a physical machine running ubuntu 20.04 using the docker method and the installation is fully functional.
I have access to the API and the UI.
The ip of my physical machine is "192.168.1.100", the hostname is "saveborg" and the user names of this machine are "root" and "masterbalby".
The purpose of the operation is to save the directory "/etc" of my physical machine in a BORG repo located on the same machine in "/home/masterbalby/BORG".
If I understood well the operation of cyborgbackup the process is the following to create a new backup:
- I inform the setup page
- I create a repo
- I add a client
- I create a schedule
- and finally I create the policy
- I then launch the policy and normally the backup is done.
But it doesn't go as planned...
First of all step 1 :
What are the mandatory fields in my case ?
I filled the field "Ssh password" with my password (which is the same for the user "root" and "masterbalby").
What are the "Ssh Key" and "Url" fields for ?
Are they important ?
Then step 2 :
I fill the "Add Repository" page in the following way:
- fields "Name": test_repo
- fields "Path" : [email protected]:/home/masterbalby/BORG
- "Repository Key" fields: ABCD123456
- I select "Enabled"
- to finish I click on "SAVE".
The problem is that nothing happens in "/home/masterbalby/BORG", no repo creation.
I saw on the wiki that the repo was created by the "prepare_repository" script.
So I inspected the script and noticed that the script first looked to see if curl and borg were present in the api container. By default curl is present but not borg. The script then tries to download borg to the borgbackup github.
But an error (I think) in the script prevents the download.
Here is the line in question (the 11) :
binary=$(curl -sL $ttps://api.github.com/repos/borgbackup/borg/releases/latest | grep "browser_download_url" | grep 'borg-linux64"' | cut -d : -f 2,3 | tr -d \\")
If we remove the " just after borg-linux64 the script now manages to download borg and install it.
Here is the modified line 11 :
binary=$(curl -sL $ttps://api.github.com/repos/borgbackup/borg/releases/latest | grep "browser_download_url" | grep 'borg-linux64' | cut -d : -f 2,3 | tr -d \\")
In this way borg can be installed in the container.
Unfortunately if I recreate the repo it still doesn't work.
When I click on "SAVE" is the repo created right away?
Step 3:
I fill in the "add client" page as follows:
- fields "Hostname" : "saveborg"
- I select "enabled".
- and I validate with "SAVE"
According to the doc the IP and the borg version of the client are filled by the script "preparation_client".
But in the same way as in step 2 nothing happens.
I haven't gone to the next steps yet. I prefer to create my repo and configure the client first.
Since I can't do these steps I tried to create the repo and the client from the API.
I manage to fill in both forms but the repo is still not created and for the client I fill in his IP address and once validated, in the client list the client appears without an IP address.
That's it for tonight.
I know this post is quite long but I tried to be as clear as possible.
In advance thank you very much for the help you can give me.