How to : Backup Yunohost server on Borgbase with Borgbackup

Have you installed borgserver with a good ssh public key ?

Yes. I’m using just the key (xxxx) without any other information.

ssh-ed25519 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx user@pc-Ubuntu

UPDATE: I’ve opened an issue on the Vorta repository and they told me it’s related to Borg and that the error connection closed by remote it’s a known issue.

It’s a pity that is not possible to use Vorta with the yunohost borg server app because it would be very easy to use.

Thank you

Seems like it would be nice if either the ynh borg app readme linked to this tutorial, or perhaps the yunohost docs referencing the use of borgbackup. My experience installing was: After installing the app I was rather clueless about how to continue (and didn’t check my email - didn’t expect it to email me.) Had I not found this, I’m not sure where I’d be.

1 Like

I agree that it is not working out of the box. It would be very very nice to have a gui that does everything but we always have to account that the projects is maintained by volunteers.

1 Like

Hi everybody

I’d like to ask about “prune” strategy. I have default config for this feature, I have no space problems so far, but as I had never used automated backups :roll_eyes: :see_no_evil: I wonder how many copies should I keep.

I personally consider that it keeps too many copies, but it could be I’m missing the point of why are they needed. Give me a reason :rofl: to keep backups from 6 months ago!

I know it depends how sensible and how often data changes on the server (or how much paranoid I am :smiley: ), but since march I only had to restore one app, it was my fault, I restored “yesterday’s copy”, solved.

I’m honest with this, I’m totally noob on admin servers. My ynh is for personal use of my family (nextcloud files, xmpp server, some books, wiki…)

thanks

Please would you share your backup strategy and thoughts? Thanks

On my side, “old” backups are only here if something went wrong and I did hot noticed it for days/weeks.
For example files deleted in NextCloud, or mail deleted by accident.
If I only keep the last backup, when the problem will be noticed, the save will also contain it.

As Borg also does de-duplication, multiple saves do not mean that the size is multiplicated, only the difference is saved.

That’s why I keep daily backup for some apps, weekly backups for others, and a few monthly backups for all of them.

1 Like

This is one reason, of course:

Another, imagine some lowlife manages to guess your password, and decides to encrypt all your files that have not been accessed this week: you’d never find out in time if you only got three daily backups.

1 Like

Hello I am trying to install this backup solution.
I took a subscription on borgbase because I have 37 Gb to save …

Here I am installing Borg backup App on my YunoHost but I have a dependency problem it seems to me and the app cannot install …

I enclose you my Yunopast, if you understand, I am interested in your information, in advance a big thank you!
Yunopast +> https://paste.yunohost.org/raw/ikubarizor


Bonjour je suis en train d’essayer d’installer cette solution de Backup.
J’ai pris un abonnement sur borgbase car j’ai 37 Gb à sauvegarder…

Là j’en suis à installer Borg backup App sur mon YunoHost mais j’ai un soucis de dépendances il me semble et l’app n’arrive pas à s’installer…

Je vous joins mon Yunopast, si vous comprenez, je suis preneur de vos informations, par avance un grand merci !
Yunopast +> https://paste.yunohost.org/raw/ikubarizor

Hello fdrubigny1

In the Yunopast, I can see that Borg installer failed to install dependencies for Borg.

I also see that Borg installer try to install those dependencies with apt-get, the Debian packaging system. And before installing anything, it update the package list, which is the right way to proceed :

2021-11-08 19:54:14,410: DEBUG - + apt-get --assume-yes --quiet -o=Acquire::Retries=3 -o=Dpkg::Use-Pty=0 update
2021-11-08 19:54:14,554: DEBUG - Get:1 Index of /debian/ buster InRelease [18.2 kB]
2021-11-08 19:54:14,574: DEBUG - Hit:2 http://download.onlyoffice.com/repo/debian squeeze InRelease
2021-11-08 19:54:14,587: DEBUG - Get:3 Index of /debian-security buster/updates InRelease [65.4 kB]
2021-11-08 19:54:16,047: DEBUG - Hit:4 https://packagecloud.io/ookla/speedtest-cli/debian buster InRelease

Those lines are relatives to the repository configured in the source.list of the Debian packaging system.
But I can’t see a full Debian repository like deb.debian.org or ftp.debian.org.

Did you manually modify your /etc/apt/sources.list ?
Or, if you edit this file, do you see commented lines with *.debian.org ?

1 Like

Hello,
thank you for this feedback.
Indeed, I manually changed the sources.list file …
I modified it and suddenly the installation could be done!
Thank you so much.
Yours sincerely.

1 Like

Hi,

I set up a new Yunohost on my Pi as I couldn’t go through the migration process. I installed the Borg app again. Now I am wondering how I can retrieve my backups from Borgbase. Thank you for any help.

If it is not possible as I don’t have access to my keys generated on my old machine I can restore an old image I did of the previous Yunohost installation (April 2022) and try to restore the keys from there. But how do do that?

Thank you.

Even if I already did this, I do not remember exactly how it is done.
But what I know is that the key is only used to connect to the repo, so you do not really need it as you have other way to access it, and even add a new key to connect via ssh.
The important part youqwill absolutely need is the password you set, if you do not have this, you’ll need to find it or you will not be able to read the backup.

1 Like

Thank you, it worked!

Hi,

Could you specify what is backed up when selecting the following settings in the Borg backup app settings:

What should be backuped ?
Configuration
Data
Data multimedia

Thank you.

I am confused here: I created a repo at borgbase, imported the SSL keys from admin@yunohost. Added the repo to the borg app inside Yunohost but apparently it cannot connect.
A borg init --encryption=none ssh://hash@hash.repo.borgbase.com/./~repo works, as does borg list <address>. Any idea what I could/should change here? I tried the various combinations of suffixes listed here but to no avail. Always Connection closed by remote host. Is borg working on the server?.

First of all: I’m not familiar with borgbase.com, and hardly more with borg itself.

As borg initiates an SSH-connection, can you log in at borgbase.com with a regular SSH client? If it is locked down, at least you could get additional info by running at a higher verbosity level (running ssh -vv hash@hash.repo.borgbase.com and providing your password in a terminal).

Thanks for your input! borgbase can only be reached via the borg protocol but I can try logging with SSH to check the keys (see also their FAQ) and they appear to be valid. It most certainly is the type of addressing the repo as configured in the borg app on Yunohost. Maybe I need to check the actual code that is used to access the repository.
Additional question - can I somehow set a specific repo passkey in the borg app after the installation?

Good evening helge,

You should follow wbk’s advice as borg data are transported on ssh tunnel : no valid ssh connection, no backup.

The next step should be to try and modify the /etc/yunohost/apps/borg/settings.yml where you can find the repository address (and the repo passphrase).

As I remember, following the logfiles provided in the “troubleshooting” section give all required information.

Good luck and, eventually, provide information (verbose command return, logfile paste) if you need more help.

1 Like

Thanks for the info, now it worked! I think the problem was that I misinterpreted this part: With borgserver_ynh apps you can't specify another repo path than ~/backup as that I have to enter a repo address with backup at the end whereas BorgBase expects /~/repo as the path.
Now it seems to work and I can specify the email frequency, which was annoying with the regular backup (scheduled daily via a cronjob).

1 Like