YunoHost-Apps / borgserver_ynh

Borg server package for YunoHost
https://www.borgbackup.org/
GNU Affero General Public License v3.0
9 stars 6 forks source link

Make it possible to have multiple backup repositories for a single ssh user #47

Open eauchat opened 3 years ago

eauchat commented 3 years ago

It could be nice if it was possible to receive backups in multiple repositories, in the same server, but without having to use different users. Something like this:

At the moment, to have multiple repositories, one must install multiple times borgserver, but the install works only if a new user is chosen. Maybe the way to do this would be to make it possible to install borgserver without creating a custom user for it, just reusing an existing user. But I believe that would make things quite complicated in case of removing the app.

The enhancement is quite small for the complexity it'd bring to implement it, so I'm not sure at all it would be worth it, but I post it just to leave some trace of reflections in that direction.

jose1711 commented 2 years ago

:+1: For now you can still perhaps go with custom SSH commands in ~/.ssh/authorized_keys:

command="borg serve --restrict-to-path /path/to/repoA",restrict ssh-ed25519 XXX repoA_key
command="borg serve --restrict-to-path /path/to/repoB",restrict ssh-ed25519 YYY repoB_key
eauchat commented 2 years ago

Yes, manually allowing more connections work indeed. I was interested in having the full functionalities of the borgerver_ynh app for each repo, meaning error emails when missing backups...