borg_ynh icon indicating copy to clipboard operation
borg_ynh copied to clipboard

Manifest v2

Open Salamandar opened this issue 1 year ago • 13 comments

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)

Salamandar avatar Jan 06 '24 13:01 Salamandar

!testme

Salamandar avatar Jan 06 '24 13:01 Salamandar

Alrighty! Test Badge

yunohost-bot avatar Jan 06 '24 13:01 yunohost-bot

!bookwormtestme

zamentur avatar Apr 10 '24 19:04 zamentur

:books: Test Badge

yunohost-bot avatar Apr 10 '24 19:04 yunohost-bot

!bookwormtestme

zamentur avatar Apr 10 '24 21:04 zamentur

:books: :worm: Test Badge

yunohost-bot avatar Apr 10 '24 21:04 yunohost-bot

!testme

Limezy avatar May 01 '24 13:05 Limezy

:rocket: Test Badge

yunohost-bot avatar May 01 '24 13:05 yunohost-bot

:books: Test Badge

yunohost-bot avatar May 01 '24 13:05 yunohost-bot

!testme

alexAubin avatar May 02 '24 14:05 alexAubin

Alrighty! Test Badge

yunohost-bot avatar May 02 '24 14:05 yunohost-bot

Living in the future, are we? Test Badge

yunohost-bot avatar May 02 '24 14:05 yunohost-bot

The app as is doesn't seem to work. Here is a log of a failed backup https://paste.yunohost.org/raw/okesisubiz

Limezy avatar May 10 '24 12:05 Limezy

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/*/

alexAubin avatar May 12 '24 19:05 alexAubin

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

Limezy avatar May 13 '24 04:05 Limezy

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 ?

Salamandar avatar May 13 '24 08:05 Salamandar

I have upgraded and launched a backup, it takes crazy long, as usual ! I'll give a feedback once done, hopefully

Limezy avatar May 13 '24 16:05 Limezy

(Smol poke in case you have feedback now)

alexAubin avatar May 14 '24 11:05 alexAubin

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

Limezy avatar May 14 '24 13:05 Limezy

I have restarted my server, which relaunched a backup. I think the service should be disabled by default ?

Limezy avatar May 15 '24 02:05 Limezy

That's a known issue : https://github.com/YunoHost-Apps/borg_ynh/issues/92

alexAubin avatar May 15 '24 06:05 alexAubin

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 : image

Limezy avatar May 15 '24 06:05 Limezy

@Salamandar thanks I confirm that the config panel changes are now made without any warnings. Now launching again a backup.

Limezy avatar May 16 '24 05:05 Limezy

@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.

Limezy avatar May 16 '24 05:05 Limezy

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 avatar May 16 '24 05:05 Limezy

@Limezy might be… at least yeah there's a bug in the install script for sure, but not in the upgrade script.

Salamandar avatar May 16 '24 11:05 Salamandar

Ok let me upgrade and try again even though it's probably another issue !

Limezy avatar May 16 '24 13:05 Limezy

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

Limezy avatar May 16 '24 15:05 Limezy

Smol poke, is it working now ? :eyes:

alexAubin avatar May 18 '24 13:05 alexAubin

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 !

Limezy avatar May 18 '24 15:05 Limezy