YunoHost-Apps / borgwarehouse_ynh

BorgWarHouse package for YunoHost
https://borgwarehouse.com/
GNU General Public License v3.0
1 stars 1 forks source link

Path #2

Closed ericgaspar closed 1 month ago

ericgaspar commented 7 months ago

!testme

yunohost-bot commented 7 months ago

Alrighty! Test Badge

ericgaspar commented 7 months ago

!testme

yunohost-bot commented 7 months ago

Meow :cat2: Test Badge

silverhook commented 6 months ago

Will this patch fix the issue where BorgWarehouse does not want to create a repo because it is missing ~/.ssh/authorized_keys?

ericgaspar commented 6 months ago

!testme

yunohost-bot commented 6 months ago

Alrighty! Test Badge

ericgaspar commented 6 months ago

Will this patch fix the issue where BorgWarehouse does not want to create a repo because it is missing ~/.ssh/authorized_keys?

This PR needs to be tested

silverhook commented 6 months ago

@ericgaspar, can I help in any way?

ericgaspar commented 6 months ago

if you are willing to test it will help 👍

silverhook commented 6 months ago

If you can walk me through what I should do, happy to.

(I’m new to YunoHost, but not new to Linux)

silverhook commented 6 months ago

@ericgaspar , if you release a testing version on YunoHost, I’d be glad to take it for a spin and report my experience.

ericgaspar commented 6 months ago

You can test (install or upgrade) this branch with this commands in a terminal

sudo yunohost app install https://github.com/YunoHost-Apps/borgwarehouse_ynh/tree/path
or
sudo yunohost app upgrade borgwarehouse -u https://github.com/YunoHost-Apps/borgwarehouse_ynh/tree/path --force
silverhook commented 6 months ago

Thanks, @ericgaspar ,

If I just force upgrade and restart the service, I still get this error when trying to add a repository:

An error has occurred : /home/borgwarehouse/.ssh/authorized_keys must be present

But if I remove the app and (re-)install it, it seems to work now.

silverhook commented 6 months ago

OK, I am running into another problem: I can create backup repos, but cannot seem to access them.

If I try to borg init a repo from my laptop that I created using BorgWarehouse@YunoHost, I get the following error:

borgwarehouse@{$domain}'s password: Remote: Permission denied, please try again.

I have no idea which password it wants from me.

I also tried to import the repository from my old borg server, but it does not seem to show up as used space in the dashboard.

That brings me to the question where does BorgWarehouse on YunoHost expect the repos/ to be?

BTW, I don’t know if this affects anything, but even though there is /home/borgwarehouse/, borgwarehouse’s home directory is still set to /var/www/borgwarehouse/.

silverhook commented 6 months ago

I tried again to init a backup repository with borg init --debug -e repokey-blake2 […] and I get:

sing builtin fallback logging configuration
33 self tests completed in 0.04 seconds
SSH command line: ['ssh', '-p', '22', '{redacted}', 'borg', 'serve', '--debug']
Remote: ssh: connect to host {redacted} port 22: Connection refused
Connection closed by remote host. Is borg working on the server?
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/borg/archiver.py", line 5343, in main
    exit_code = archiver.run(args)
                ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/borg/archiver.py", line 5263, in run
    return set_ec(func(args))
                  ^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/borg/archiver.py", line 167, in wrapper
    repository = RemoteRepository(location.omit_archive(), create=create, exclusive=argument(args, exclusive),
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/borg/remote.py", line 578, in __init__
    raise ConnectionClosedWithHint('Is borg working on the server?') from None
borg.remote.ConnectionClosedWithHint: Connection closed by remote host. Is borg working on the server?

Platform: Linux leza 6.6.8-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Thu, 21 Dec 2023 19:00:41 +0000 x86_64
Linux: Unknown Linux  
Borg: 1.2.7  Python: CPython 3.11.6 msgpack: 1.0.5 fuse: llfuse 1.5.0 [pyfuse3,llfuse]
PID: 239375  CWD: /home/hook
sys.argv: ['/usr/bin/borg', 'init', '--debug', '-e', 'repokey-blake2', 'ssh://borgwarehouse@{redacted}']
SSH_ORIGINAL_COMMAND: None
silverhook commented 5 months ago

@ericgaspar , anything else I can help with?

I’m interested to getting this fixed, as migrating my Borg backups to YuNoHost is the last thing keeping my noisy old server(s) running.

silverhook commented 5 months ago

I poked around a bit and it seems to be a permission (and folder location) issue.

Limezy commented 2 months ago

@ericgaspar would you mind giving me the rights on this repo ? I need to use borgwarehouse so I'll solve the issues first

Limezy commented 2 months ago

!testme

yunohost-bot commented 2 months ago

May the CI gods be with you! Test Badge

yunohost-bot commented 2 months ago

:books: Test Badge

Limezy commented 1 month ago

superseded by #13 after a rebase of these commits