Borg partial fail

, ,

:uk:/:us: Borg partial fail

My YunoHost server

Hardware: computer
YunoHost version: 4.2.4
I have access to my server : Through SSH + through the webadmin + direct access via keyboard / screen
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no

Description of my issue

I have 2 borg apps installed, one daily just for Nextcloud, and one weekly for everything but nextcloud.
For twe weeks now, the weekly backup partially fails, here is the received email :

https://paste.yunohost.org/raw/apafajubum

And here is one of the specific logs of error (the one for Wireguard)
https://paste.yunohost.org/raw/epozelayix
(note : the ‘normal’ backup of wireguard works)


:fr: Échec partiel de sauvegarde borg

Mon serveur YunoHost

Matériel: ordinateur
Version de YunoHost: 4.2.4
J’ai accès à mon serveur : En SSH + Par la webadmin + En direct avec un clavier/écran
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non

Description du problème

J’ai deux applications borg installée, une qui tourne tous les jours pour Nextcloud, et une hebdomadaire pour le reste.
Celle hebdomadaire est en échec partiel depuis deux semaines.
Voici le mail que je reçoit : https://paste.yunohost.org/raw/apafajubum

Et le contenu d’un des logs d’erreur (celui de wireguard) : https://paste.yunohost.org/raw/epozelayix
(note : la sauvegarde « normale » de wireguard marche)

What’s the result of :

namei -l /mnt/blackBackup/borgServer/backup

I think it’s a permission issue

~ namei -l /mnt/blackBackup/borgServer/backup
f: /mnt/blackBackup/borgServer/backup
drwxr-xr-x root     root     /
drwxr-xr-x root     root     mnt
drwxr-xr-x root     root     blackBackup
drwxr-xr-x root     root     borgServer
drwxr-xr-x borgborg borgborg backup

borgborg is the user created before when I used borg client/server on the same machine (now it is a local backup).
Another note is that some backup works (the daily nextcloud backup works for example, and even in this backup batch, some backup succeds)

You probably need to do a

chown -R borg:borg /mnt/blackBackup/borgServer/backup

or this one if the weekly backup is the second app installed

chown -R borg__2:borg__2 /mnt/blackBackup/borgServer/backup

But if I do this (the second line), will it make the 1st backup fail ?
Should I go back to use a client/server way instead of a local backup ?

I just realize that borg command are run as sudo, so permissions hould not be a problem.

They are both on the same repo (before that I only had one repo for a weekly backup, but I changed to have frequent NextCloud backups and weekly backups of everything else).

And yes, they are run as root, inside the repository there are backups from :

  1. borgborg, from when I used client/server (only one full backup per week)
  2. root from app borg for daily NextCloud backup
  3. root from app borg__2 for weekly everything backups

Do you think I should clear all of this and switch for 2 repos ?
One for NextCloud, and one for everything else ?

One possible problem I just think of is that maybe both backups start at the same instant.
The full backup starts to save some apps, this is quite fast for most of them.
Then the NextCloud kicks in and lock the repo while writting
And the other backup fails because it can not write.

Is this possible ?

That’s a good idea, you can change hour, by giving a systemd calendar value in /etc/systemd/system/borg.timer and /etc/yunohost/apps/borg/settings.yml

Something like :

* * * 1:00:00
Sun * * * 6:00:00

The first is for daily, the second for weekly

Don’t forget to wrap this with quotes in yml file…

frequency: '* * * 1:00:00'

I just did that for the weekly backup to give 5h for nextcloud backup.
I just noticed the daily backup always take 8 minutes, but when both backups run, it takes them 15min.
See you next week for next backup.

Oh, and I still have 2 questions.
In your example you used

But in the settings.yml file, it was on_calendar: Weekly
So I used on_calendar, should I comment this and use frequency ?

Same question for borg.timer, I put the value in OnCalendar=

And last question, do I have something to do so this modification is used ?

edit after the thread was closed :
The correct syntax is Sun *-*-* 6:00:00 and not Sun * * * 6:00:00 (just in case someone find this some day…)

no i made a mistake (i write this just by memory…)

May be systemctl daemon-reload

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.