borg_ynh
borg_ynh copied to clipboard
Manifest v2
Problem
- Description of why you made this PR
Solution
- And how do you fix that problem
PR Status
- [ ] Code finished and ready to be reviewed/tested
- [ ] The fix/enhancement were manually tested (if applicable)
Automatic tests
Automatic tests can be triggered on https://ci-apps-dev.yunohost.org/ after creating the PR, by commenting "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!". (N.B. : for this to work you need to be a member of the Yunohost-Apps organization)
!testme
!bookwormtestme
!bookwormtestme
!testme
!testme
The app as is doesn't seem to work. Here is a log of a failed backup https://paste.yunohost.org/raw/okesisubiz
Can you share the full log of the upgrade and/or the output of ls -l /var/www/borg/
and ls -l /var/www/borg/venv/*/
Sure. It's not an upgrade but an install, so no upgrade logs.
# ls -l /var/www/borg/
total 8
-rwxr----- 1 borg borg 3268 May 10 11:35 backup-with-borg
drwxr-xr-x 6 borg borg 4096 May 10 11:32 venv
# ls -l /var/www/borg/venv/*/
/var/www/borg/venv/bin/:
total 24
-rwxr-xr-x 1 borg borg 226 May 10 11:35 borg
-rwxr-xr-x 1 borg borg 226 May 10 11:35 borgfs
-rwxr-xr-x 1 borg borg 235 May 10 11:32 pip
-rwxr-xr-x 1 borg borg 235 May 10 11:32 pip3
-rwxr-xr-x 1 borg borg 235 May 10 11:32 pip3.9
lrwxrwxrwx 1 borg borg 7 May 10 11:32 python -> python3
lrwxrwxrwx 1 borg borg 16 May 10 11:32 python3 -> /usr/bin/python3
lrwxrwxrwx 1 borg borg 7 May 10 11:32 python3.9 -> python3
-rwxr-xr-x 1 borg borg 222 May 10 11:32 wheel
/var/www/borg/venv/include/:
total 0
/var/www/borg/venv/lib/:
total 4
drwxr-xr-x 3 borg borg 4096 May 10 11:32 python3.9
/var/www/borg/venv/lib64/:
total 4
drwxr-xr-x 3 borg borg 4096 May 10 11:32 python3.9
/var/www/borg/venv/share/:
total 4
drwxr-xr-x 2 borg borg 4096 May 10 11:32 python-wheels
The app as is doesn't seem to work. Here is a log of a failed backup https://paste.yunohost.org/raw/okesisubiz
Found the issue : python3 -m venv --upgrade
does not create the activate script (why ???).
Issue is coming from this line https://github.com/python/cpython/blob/76dc1bf5be3b360f7d8c476accb0d8d53c8dfb08/Lib/venv/init.py#L77
EDIT: fixed by 178a24b, i just call borg directly in the script instead of using activate.
@Limezy thank you for having accepted to test this branch :) Could you please try to upgrade to the latest commit and check if it’s better ?
I have upgraded and launched a backup, it takes crazy long, as usual ! I'll give a feedback once done, hopefully
(Smol poke in case you have feedback now)
Still waiting for my server... as of now my /var/log/borg/xxx.log is empty and /var/log/borg/xxx.err says still waiting... And the Yunohost-api is locked as if a Yunohost operation was pending
I have restarted my server, which relaunched a backup. I think the service should be disabled by default ?
That's a known issue : https://github.com/YunoHost-Apps/borg_ynh/issues/92
So, here is my situation, it looks like a part of my backups worked, a part failed. content of /var/log/borg/240515_0605.log : https://paste.yunohost.org/raw/holakupapu output of yunohost log share 20240515-061238-backup_create : https://paste.yunohost.org/raw/afokajutol content of /var/log/borg/240515_0605.err : https://paste.yunohost.org/raw/wovizigabo last lines of journalctl for the borg service (but I think nothing interesting) : https://paste.yunohost.org/raw/ekonetohub
I must also mention that I get this weird warning when updating the config panel :
@Salamandar thanks I confirm that the config panel changes are now made without any warnings. Now launching again a backup.
@alexAubin, looking at my logs, any clue about what's going wrong with the backup of MinIO and Outline (both apps for which I am / was the packager 😰 maybe I did something wrong ?)
Moreover it says in the doc that "The future default backup method integrated in YunoHost will be based on this software.". Is this very far future ? Would be absolutely awesome to have a nice Yunohost UX layer on top of all these geeky private keys and complex setups... And certainly a real added value of the project.
I decided to take seriously my backup pipeline after the OVH fire back in... March 21. Only tackling it now... Backup is probably a big area where self-hosting need to improve.
I have discovered that when I launch yunohost app setting borg passphrase
it outputs no value.
Whereas yunohost app setting borg repository
is working well.
Is that maybe one of the clues of our problem ?
@Limezy might be… at least yeah there's a bug in the install script for sure, but not in the upgrade script.
Ok let me upgrade and try again even though it's probably another issue !
I have tried to reinstall from scratch, using this branch. In fact I have the feeling that Borg isn't installed ! Maybe it worked before because I did an upgrade only ?
EDIT: Sorry I found it here : /var/www/borg/venv/bin/borg
Smol poke, is it working now ? :eyes:
I have excluded dex and outline and everything is working. But the problem still remains for these two apps. What I'm not clear is whether the problem is at borg_ynh level, these apps backup script level, or Yunohost core level ? The above shared logs remain relevant. Thanks for your help I'd really like this to be working !